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

Commit

Permalink
Browse files Browse the repository at this point in the history
Selectmenu: improved preventFocusZoom. Fixes #5333.
  • Loading branch information
jaspermdegroot committed Nov 29, 2012
1 parent de35dc4 commit b694e07
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions js/jquery.mobile.forms.select.js
Expand Up @@ -174,17 +174,25 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
});

// In many situations, iOS will zoom into the select upon tap, this prevents that from happening
self.button.bind( "vmousedown", function() {
if( self.options.preventFocusZoom ){
if ( self.options.preventFocusZoom ) {
self.button.bind( "vmousedown", function() {
$.mobile.zoom.disable( true );
}
}).bind( "mouseup", function() {
if ( self.options.preventFocusZoom ) {
});
self.label.bind( "click focus", function() {
$.mobile.zoom.disable( true );
});
self.select.bind( "focus", function() {
$.mobile.zoom.disable( true );
});
self.button.bind( "mouseup", function() {
setTimeout(function() {
$.mobile.zoom.enable( true );
}, 0);
}
});
}, 0 );
});
self.select.bind( "blur", function() {
$.mobile.zoom.enable( true );
});
}
},

selected: function() {
Expand Down

0 comments on commit b694e07

Please sign in to comment.