Skip to content

Commit fbb2fc2

Browse files
author
scottjehl
committed
lengthened timer for Android, and added a check to let through the same event type for double-taps.
1 parent aa0a61c commit fbb2fc2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

js/jquery.mobile.forms.checkboxradio.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,17 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
4343

4444
"touchend mouseup": function( event ){
4545
//prevent both events from firing, keep the first
46-
if( $(this).parent().is('.ui-disabled') || $(this).data("prevEvent") ){
46+
if( $(this).parent().is('.ui-disabled') || $(this).data("prevEvent") && $(this).data("prevEvent") !== event.type ){
4747
return false;
4848
}
4949
$(this).data("prevEvent", event.type);
5050
setTimeout(function(){
5151
label.removeData("prevEvent");
52-
}, 200);
52+
}, 1000);
5353

5454
input.attr( "checked", inputtype === "radio" && true || !input.is( ":checked" ) );
5555
input.trigger( "updateAll" );
56-
return false;
56+
event.preventDefault();
5757
},
5858

5959
click: false

0 commit comments

Comments
 (0)