mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-04 12:54:41 +00:00
added event test to make sure the which was being defined on triggered events
This commit is contained in:
parent
9cc8daa91a
commit
5346a91595
1 changed files with 19 additions and 0 deletions
|
|
@ -528,4 +528,23 @@
|
|||
.trigger( "resize" )
|
||||
.trigger( "resize" );
|
||||
});
|
||||
|
||||
asyncTest( "mousedown mouseup and click events should add a which when its not defined", function() {
|
||||
var whichDefined = function( event ){
|
||||
same(event.which, 1);
|
||||
};
|
||||
|
||||
$( document ).bind( "vclick", whichDefined);
|
||||
$( document ).trigger( "click" );
|
||||
|
||||
$( document ).bind( "vmousedown", whichDefined);
|
||||
$( document ).trigger( "mousedown" );
|
||||
|
||||
$( document ).bind( "vmouseup", function( event ){
|
||||
same(event.which, 1);
|
||||
start();
|
||||
});
|
||||
|
||||
$( document ).trigger( "mouseup" );
|
||||
});
|
||||
})(jQuery);
|
||||
|
|
|
|||
Loading…
Reference in a new issue