Bug Tracker

Opened 11 years ago

Last modified 10 years ago

#9279 closed bug

delegate() bind does not handle mouseover/mouseout and mouseenter/mouseout correctly for selected elements — at Version 12

Reported by: [email protected] Owned by: [email protected]
Priority: blocker Milestone: 1.7
Component: event Version: 1.6.1
Keywords: 1.7-discuss Cc:
Blocked by: Blocking:

Description (last modified by john)

Affects Version 1.6.1 only, 1.6 works fine

Tested in Firefox(3.6) and Chrome Windows XP

May be related to Ticket #9069

Test Case:

<div id="test_box"> Test Box<br><br> <a href="#" class="test1">Test 1</a><br><br> <a href="#" class="test2">Test 2</a> </div> <script> $(document).ready(function() {

$("#test_box").delegate("a.test1", "mouseenter", function() { console.log('mouseenter'); }); $("#test_box").delegate("a.test1", "mouseleave", function() { console.log('mouseleave'); }); $("#test_box").delegate("a.test2", "mouseover", function() { console.log('mouseover'); }); $("#test_box").delegate("a.test2", "mouseout", function() { console.log('mouseout'); });


mousing over "Test 2" does not generate any output using 1.6.1 but works fine in older version including 1.6.

Also noticed if we assign all 4 mouse events with the same selector (a.test1), only mouseenter and mouseleave are fired.

Change History (12)

comment:1 Changed 11 years ago by Rick Waldron

Component: unfiledevent
Owner: set to [email protected]
Status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a reduced jsFiddle test case to help us assess your ticket!

Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, I've created this boilerplate: http://jsfiddle.net/rwaldron/da3nM/ Open the link and click to "Fork" in the top menu.

comment:2 Changed 11 years ago by [email protected]

Status: pendingnew

comment:3 Changed 11 years ago by addyosmani

Priority: undecidedlow
Status: newopen

Confirmed. Works fine with 1.6 and below but there appears to be a regression in 1.6.1 where mouseover and mouseout aren't firing or being bound correctly.

comment:4 Changed 11 years ago by Rick Waldron

This might be a little less cluttered for the basis of a unit/ref test


comment:5 Changed 11 years ago by Rick Waldron

Priority: lowblocker

comment:6 Changed 11 years ago by Rick Waldron

#9312 is a duplicate of this ticket.

comment:7 Changed 11 years ago by john

Keywords: 1.7-discuss added

Nominating ticket for 1.7 discussion.

comment:8 Changed 11 years ago by Rick Waldron

Description: modified (diff)

+1, Seems like a bug, should be fixed

comment:9 Changed 11 years ago by jaubourg

+1, Bug bug bug

comment:10 Changed 11 years ago by timmywil


comment:11 Changed 11 years ago by dmethvin

Description: modified (diff)

+1, although this is a bug not a feature.

comment:12 Changed 11 years ago by john

Description: modified (diff)


Note: See TracTickets for help on using tickets.