Bug Tracker

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#5821 closed bug (fixed)

mouseenter/leave behave like mouseover/out with live events

Reported by: korchev Owned by: brandon
Priority: low Milestone: 1.5
Component: event Version: 1.4
Keywords: Cc: akorchev@…
Blocked by: Blocking:


The description says it all. Please check the attached repro file.

Attachments (1)

repro.html (1.1 KB) - added by korchev 8 years ago.

Download all attachments as: .zip

Change History (7)

Changed 8 years ago by korchev

Attachment: repro.html added

comment:2 Changed 8 years ago by Rick Waldron

Priority: majorlow
Resolution: fixed
Status: newclosed

This issue no longer exists


Last edited 8 years ago by Rick Waldron (previous) (diff)

comment:3 in reply to:  2 Changed 8 years ago by akorchev@…

No, the problem still exists. Your code is using delegate. You need to use live events and nested elements with the same class. Here is the jsfiddle.net based example which fails in the same way as the initial case: http://jsfiddle.net/QUNQT/ Use the mouse to enter the parent element and then the child one. See what gets logged in the console.

comment:4 Changed 8 years ago by Rick Waldron


Sorry, I linked to the wrong fiddle. This is the correct fiddle, I've also updated it to use the 1.4.4rc1


Following your instructions, here is the result:

mouseenter outer mouseleave outer mouseenter inner mouseleave inner mouseenter outer mouseleave outer

Version 0, edited 8 years ago by Rick Waldron (next)

comment:5 Changed 8 years ago by akorchev@…

Should't the result be a bit different? I expect to see this: mouseenter outer mouseenter inner mouseleave inner mouseleave outer

If I change live to bind I get the desired behavior. I have updated the examples to show you: 'bind' version: http://jsfiddle.net/V8jpL/ 'live' version: http://jsfiddle.net/ct95u/1/ Also note that both divs are using the same class.

comment:6 Changed 7 years ago by jitter


Move fixed tickets to appropriate milestone

Note: See TracTickets for help on using tickets.