jquery/jquery-mobile — Issue #3236: keepNative ignored on dialog page
Author: rogiervandam
Created: 2011-12-08 07:36:06+00:00
State: open

I wanted to have some custom markup on a button, so i tried setting

$.mobile.page.prototype.options.keepNative = ".native"

before loading the framework
and applying class .native to the element.

Unfortunately, this is ignored, because the framework searches for
var page = $(target).closest(":jqmData(role='page')").data( "page" ) (line 314)

should be:

var page = $(target).closest(" :jqmData(role='page'), :jqmData(role='dialog')").data( "page" ) (line 314)

Problem is that type (e.g. 'page') and role (e.g. 'dialog') are both controlled via the data-role propery. Another idea would be to use both data-role and data-rel properties on the page being used as a dialog.