Ensure the hover event doesn't match hovercraft. Witchcraft, maybe.

This commit is contained in:
Dave Methvin 2011-11-10 18:05:58 -05:00
parent d589709851
commit 5ba7f60822
2 changed files with 4 additions and 1 deletions

View File

@ -2,7 +2,7 @@
var rformElems = /^(?:textarea|input|select)$/i, var rformElems = /^(?:textarea|input|select)$/i,
rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/, rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/,
rhoverHack = /\bhover(\.\S+)?/, rhoverHack = /\bhover(\.\S+)?\b/,
rkeyEvent = /^key/, rkeyEvent = /^key/,
rmouseEvent = /^(?:mouse|contextmenu)|click/, rmouseEvent = /^(?:mouse|contextmenu)|click/,
rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,

View File

@ -807,6 +807,9 @@ test("hover() and hover pseudo-event", function() {
var balance = 0; var balance = 0;
jQuery( "#firstp" ) jQuery( "#firstp" )
.on( "hovercraft", function() {
ok( false, "hovercraft is full of ills" );
})
.bind("hover", function( e ) { .bind("hover", function( e ) {
if ( e.type === "mouseenter" ) { if ( e.type === "mouseenter" ) {
balance++; balance++;