mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-17 06:20:26 +00:00
lengthened timer for Android, and added a check to let through the same event type for double-taps.
This commit is contained in:
parent
aa0a61c407
commit
fbb2fc2c60
1 changed files with 3 additions and 3 deletions
|
|
@ -43,17 +43,17 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
|
|||
|
||||
"touchend mouseup": function( event ){
|
||||
//prevent both events from firing, keep the first
|
||||
if( $(this).parent().is('.ui-disabled') || $(this).data("prevEvent") ){
|
||||
if( $(this).parent().is('.ui-disabled') || $(this).data("prevEvent") && $(this).data("prevEvent") !== event.type ){
|
||||
return false;
|
||||
}
|
||||
$(this).data("prevEvent", event.type);
|
||||
setTimeout(function(){
|
||||
label.removeData("prevEvent");
|
||||
}, 200);
|
||||
}, 1000);
|
||||
|
||||
input.attr( "checked", inputtype === "radio" && true || !input.is( ":checked" ) );
|
||||
input.trigger( "updateAll" );
|
||||
return false;
|
||||
event.preventDefault();
|
||||
},
|
||||
|
||||
click: false
|
||||
|
|
|
|||
Loading…
Reference in a new issue