mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-24 09:50:26 +00:00
Fixing tap/taphold tests that broke when fastclick/vmouse changes landed.
This commit is contained in:
parent
62f8ce254e
commit
f80d286ecb
1 changed files with 8 additions and 7 deletions
|
|
@ -146,7 +146,7 @@
|
|||
taphold = true;
|
||||
});
|
||||
|
||||
$($.event.special.tap).trigger("touchstart");
|
||||
$($.event.special.tap).trigger("vmousedown");
|
||||
|
||||
setTimeout(function(){
|
||||
ok(taphold);
|
||||
|
|
@ -162,7 +162,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
asyncTest( "touchmove prevents taphold", function(){
|
||||
asyncTest( "move prevents taphold", function(){
|
||||
expect( 1 );
|
||||
var taphold = false;
|
||||
|
||||
|
|
@ -176,11 +176,11 @@
|
|||
});
|
||||
|
||||
//NOTE start the touch events
|
||||
$($.event.special.tap).trigger("touchstart");
|
||||
$($.event.special.tap).trigger("vmousedown");
|
||||
|
||||
//NOTE fire touchmove to push back taphold
|
||||
setTimeout(function(){
|
||||
$($.event.special.tap).trigger("touchmove");
|
||||
$($.event.special.tap).trigger("vmousecancel");
|
||||
}, 100);
|
||||
|
||||
//NOTE verify that the taphold hasn't been fired
|
||||
|
|
@ -203,8 +203,9 @@
|
|||
//NOTE record the tap event
|
||||
$($.event.special.tap).bind("tap", checkTap);
|
||||
|
||||
$($.event.special.tap).trigger("touchstart");
|
||||
$($.event.special.tap).trigger("touchend");
|
||||
$($.event.special.tap).trigger("vmousedown");
|
||||
$($.event.special.tap).trigger("vmouseup");
|
||||
$($.event.special.tap).trigger("vclick");
|
||||
|
||||
setTimeout(function(){
|
||||
start();
|
||||
|
|
@ -377,4 +378,4 @@
|
|||
returnValue: undefined //NOTE result of unbind function call
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
})(jQuery);
|
||||
|
|
|
|||
Loading…
Reference in a new issue