diff options
author | Dave Methvin <dave.methvin@gmail.com> | 2011-11-10 18:05:58 -0500 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2011-11-10 18:05:58 -0500 |
commit | 5ba7f60822f05d1b5681c938e7ba3479c0f31142 (patch) | |
tree | b47b6ca6f619889f4922cec25204aceb68b04307 | |
parent | d5897098510faba7f1c14fdd0ad961add42fb5c1 (diff) | |
download | jquery-5ba7f60822f05d1b5681c938e7ba3479c0f31142.tar.gz jquery-5ba7f60822f05d1b5681c938e7ba3479c0f31142.zip |
Ensure the hover event doesn't match hovercraft. Witchcraft, maybe.
-rw-r--r-- | src/event.js | 2 | ||||
-rw-r--r-- | test/unit/event.js | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/event.js b/src/event.js index 43d246eee..cd946dadb 100644 --- a/src/event.js +++ b/src/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)$/, diff --git a/test/unit/event.js b/test/unit/event.js index 17caed56b..0852554eb 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -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++; |