aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2011-11-10 18:05:58 -0500
committerDave Methvin <dave.methvin@gmail.com>2011-11-10 18:05:58 -0500
commit5ba7f60822f05d1b5681c938e7ba3479c0f31142 (patch)
treeb47b6ca6f619889f4922cec25204aceb68b04307
parentd5897098510faba7f1c14fdd0ad961add42fb5c1 (diff)
downloadjquery-5ba7f60822f05d1b5681c938e7ba3479c0f31142.tar.gz
jquery-5ba7f60822f05d1b5681c938e7ba3479c0f31142.zip
Ensure the hover event doesn't match hovercraft. Witchcraft, maybe.
-rw-r--r--src/event.js2
-rw-r--r--test/unit/event.js3
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++;