Permalink
Browse files

Selectmenu: the preventFocusZoom option check needs to be insde the e…

…vent binding.
  • Loading branch information...
jaspermdegroot committed Nov 29, 2012
1 parent b694e07 commit fda3e5ea48647b58e6f43fb8c36c0ebbec466ca3
Showing with 24 additions and 15 deletions.
  1. +24 −15 js/jquery.mobile.forms.select.js
@@ -174,25 +174,34 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
});
// In many situations, iOS will zoom into the select upon tap, this prevents that from happening
if ( self.options.preventFocusZoom ) {
self.button.bind( "vmousedown", function() {
$.mobile.zoom.disable( true );
});
self.label.bind( "click focus", function() {
$.mobile.zoom.disable( true );
});
self.select.bind( "focus", function() {
$.mobile.zoom.disable( true );
});
self.button.bind( "mouseup", function() {
self.button.bind( "vmousedown", function() {
if ( self.options.preventFocusZoom ) {
$.mobile.zoom.disable( true );
}
});
self.label.bind( "click focus", function() {
if ( self.options.preventFocusZoom ) {
$.mobile.zoom.disable( true );
}
});
self.select.bind( "focus", function() {
if ( self.options.preventFocusZoom ) {
$.mobile.zoom.disable( true );
}
});
self.button.bind( "mouseup", function() {
if ( self.options.preventFocusZoom ) {
setTimeout(function() {
$.mobile.zoom.enable( true );
}, 0 );
});
self.select.bind( "blur", function() {
}
});
self.select.bind( "blur", function() {
if ( self.options.preventFocusZoom ) {
$.mobile.zoom.enable( true );
});
}
}
});
},
selected: function() {

0 comments on commit fda3e5e

Please sign in to comment.