jquery/jquery-mobile — Issue #3120: enhanceWithin no respecting keeNative in page linked to with data-rel=dialog
Author: odedbd
Created: 2011-11-20 15:58:14+00:00
State: open

Hi,

The title says it all. I had to modify enhanceWithin to the following in order to get it to work (note the added jqmData(role='dialog') selector to .closest).

enhanceWithin: function( target ) {
// 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

//OBD - if this is a dialog through a data-rel=dialog link, the role will be dialog when we get here...
var page = $(target).closest(":jqmData(role='page'),:jqmData(role='dialog')").data( "page" ),
keepNative = (page && page.keepNativeSelector()) || "";

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