Skip to content

Commit

Permalink
Ensure the hover event doesn't match hovercraft. Witchcraft, maybe.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmethvin committed Nov 10, 2011
1 parent d589709 commit 5ba7f60
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/event.js
Expand Up @@ -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)$/,
Expand Down
3 changes: 3 additions & 0 deletions test/unit/event.js
Expand Up @@ -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++;
Expand Down

0 comments on commit 5ba7f60

Please sign in to comment.