Bug Tracker

Opened 10 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 Initial Version

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

Description

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 (0)

Note: See TracTickets for help on using tickets.