aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2011-03-09 22:38:26 -0500
committerDave Methvin <dave.methvin@gmail.com>2011-03-09 22:38:26 -0500
commit2ac4067a639856a6035c3bd00aab132c9714b52d (patch)
treef3abdaa76801630f11796ad572c12d5689f258f3 /test
parent6c124d3dd47fb399c7512c5c3b3420e438c32b65 (diff)
downloadjquery-2ac4067a639856a6035c3bd00aab132c9714b52d.tar.gz
jquery-2ac4067a639856a6035c3bd00aab132c9714b52d.zip
Fixes #8456. Make sure parent is not null before crawling into its lap, so mouseenter is triggered on a mouseover event.
Diffstat (limited to 'test')
-rw-r--r--test/unit/event.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/unit/event.js b/test/unit/event.js
index b7b260462..d66aaac9b 100644
--- a/test/unit/event.js
+++ b/test/unit/event.js
@@ -683,6 +683,20 @@ test("hover()", function() {
equals( times, 4, "hover handlers fired" );
});
+test("mouseover triggers mouseenter", function() {
+ expect(1);
+
+ var count = 0,
+ elem = jQuery("<a />");
+ elem.mouseenter(function () {
+ count++;
+ });
+ elem.trigger('mouseover');
+ equals(count, 1, "make sure mouseover triggers a mouseenter" );
+
+ elem.remove();
+});
+
test("trigger() shortcuts", function() {
expect(6);