Skip to content
Permalink
Browse files

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

  • Loading branch information...
dmethvin committed Nov 10, 2011
1 parent d589709 commit 5ba7f60822f05d1b5681c938e7ba3479c0f31142
Showing with 4 additions and 1 deletion.
  1. +1 −1 src/event.js
  2. +3 −0 test/unit/event.js
@@ -2,7 +2,7 @@

var rformElems = /^(?:textarea|input|select)$/i,
rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/,
rhoverHack = /\bhover(\.\S+)?/,
rhoverHack = /\bhover(\.\S+)?\b/,
rkeyEvent = /^key/,
rmouseEvent = /^(?:mouse|contextmenu)|click/,
rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
@@ -807,6 +807,9 @@ test("hover() and hover pseudo-event", function() {

var balance = 0;
jQuery( "#firstp" )
.on( "hovercraft", function() {
ok( false, "hovercraft is full of ills" );
})
.bind("hover", function( e ) {
if ( e.type === "mouseenter" ) {
balance++;

0 comments on commit 5ba7f60

Please sign in to comment.
You can’t perform that action at this time.