Permalink
Browse files

[custom select] Ignore request for non-native select if the select is…

… inside a popup
  • Loading branch information...
1 parent 4be8f14 commit 35951981b6fc3d6771a8e0bc91e93652dc22f45c @gabrielschulhof gabrielschulhof committed May 30, 2012
Showing with 3 additions and 2 deletions.
  1. +2 −1 js/jquery.mobile.forms.select.custom.js
  2. +1 −1 js/jquery.mobile.forms.select.js
@@ -491,7 +491,8 @@ define( [
$( document ).bind( "selectmenubeforecreate", function( event ){
var selectmenuWidget = $( event.target ).data( "selectmenu" );
- if( !selectmenuWidget.options.nativeMenu ){
+ if( !selectmenuWidget.options.nativeMenu &&
+ selectmenuWidget.element.parents(":jqmData(role='popup')").length === 0 ){
extendSelect( selectmenuWidget );
}
});
@@ -78,7 +78,7 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
_create: function() {
this._preExtension();
- // Allows for extension of the native select for custom selects and other plugins
+ // Allows for extension of the native select for custom selects and other plugins
// see select.custom for example extension
// TODO explore plugin registration
this._trigger( "beforeCreate" );

0 comments on commit 3595198

Please sign in to comment.