Skip to content
This repository
Browse code

Fix for issue 1925 - Single tap triggers two actions, especially in a…

…ndroid B1

- Trigger the list item and keyboard return/space key up to the "click" event instead of "vclick". This delays the dismissal of the custom select menu until the click event, thereby avoiding the case where the menu disappears before the browser dispatches it's synthesized mouse events (in the touch case) with a target of whatever element was underneath the menu.
  • Loading branch information...
commit 6759afff6697fcbefaa3f0facdc80d3cec450547 1 parent df8d6fa
Kin Blas authored September 01, 2011

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  js/jquery.mobile.forms.select.custom.js
4  js/jquery.mobile.forms.select.custom.js
@@ -103,7 +103,7 @@
103 103
 					.delegate( ".ui-li>a", "focusout", function() {
104 104
 						$( this ).attr( "tabindex", "-1" );
105 105
 					})
106  
-					.delegate( "li:not(.ui-disabled, .ui-li-divider)", "vclick", function( event ) {
  106
+					.delegate( "li:not(.ui-disabled, .ui-li-divider)", "click", function( event ) {
107 107
 
108 108
 						// index of option tag to be selected
109 109
 						var oldIndex = self.select[ 0 ].selectedIndex,
@@ -174,7 +174,7 @@
174 174
 							// If enter or space is pressed, trigger click
175 175
 						 case 13:
176 176
 						 case 32:
177  
-							target.trigger( "vclick" );
  177
+							target.trigger( "click" );
178 178
 
179 179
 							return false;
180 180
 							break;

0 notes on commit 6759aff

Please sign in to comment.
Something went wrong with that request. Please try again.