Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
corrected commit: find the closest page to pull the keep native selec…
Browse files Browse the repository at this point in the history
…tor Fixes #2803
  • Loading branch information
johnbender committed Oct 21, 2011
1 parent 1bc2aec commit 6bd2805
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions js/jquery.mobile.widget.js
Expand Up @@ -42,10 +42,9 @@ $.widget( "mobile.widget", {
// TODO remove dependency on the page widget for the keepNative.
// Currently the keepNative value is defined on the page prototype so
// the method is as well
var page = $(target).data( "page" ),
keepNative = page && page.keepNativeSelector();
var page = $(target).closest(":jqmData(role='page')").data( "page" );

$( this.options.initSelector, target ).not( keepNative || "" )[ this.widgetName ]();
$( this.options.initSelector, target ).not( page.keepNativeSelector() || "" )[ this.widgetName ]();
}
});

Expand Down

0 comments on commit 6bd2805

Please sign in to comment.