Permalink
Browse files

Selectmenu: improved preventFocusZoom. Fixes #5333.

  • Loading branch information...
jaspermdegroot committed Nov 29, 2012
1 parent 07072e3 commit 1f11c3800867d43a96f3451c58136f115c1cc94b
Showing with 16 additions and 8 deletions.
  1. +16 −8 js/widgets/forms/select.js
View
@@ -186,17 +186,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() {

0 comments on commit 1f11c38

Please sign in to comment.