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)
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.
As of 1.0 data-role="dialog" isn't supported, Dialogs are shown by virtue of the data-rel="dialog" on the link to them. We are planning on adding support for this role in 1.1 but I'm closing this as an issue because you're trying to access an invalid data-role: