Bug Tracker

Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#8308 closed bug (invalid)

mouseleave not fired over child disabled no-margin select element

Reported by: LemADEC Owned by: LemADEC
Priority: low Milestone: 1.next
Component: event Version: 1.5
Keywords: browser-bug browser-chrome browser-firefox Cc:
Blocked by: Blocking:

Description

This bug is Chrome/Firefox only.

When using hover() to register events, mouseleave is not fired when mouse pass over a child disabled select element without margins.

Chrome 9.0.597.98 and Firefox 3.6.13 do reproduce the issue.
jQuery 1.5 and 1.4.2 do reproduce the issue.

MSIE 6.0 and Opera 11.01 do not reproduce the issue.
Enabling the select element or using default margins won't reproduce the issue.

Steps to reproduce:
1- Open jsfiddle http://jsfiddle.net/wbuBv/
2- Position mouse cursor on top right corner above first label "a: xxx"
3- Move mouse cursor vertically down
4- Check logs on the right. Expected result is:

 'a div' $mouseenter
 'a div' $mouseleave
 'b label' $mouseenter
 'b label' $mouseleave
 'c div' $mouseenter
 'c div' $mouseleave     <--- this line is missing on Chrome/FF
 'd label' $mouseenter
 'd label' $mouseleave

Change History (3)

comment:1 Changed 9 years ago by jitter

Component: unfiledevent
Owner: set to LemADEC
Priority: undecidedlow
Status: newpending

Thanks for taking the time to contribute to the jQuery project by writing a bug report.

After checking your report and test case, these are my findings:

  • it's not a jQuery bug
  • happens for Firefox
  • happens for Chrome (possibly WebKit?)
  • doesn't happen for Opera and IE
  • doesn't happen when margin on select is > 0
  • doesn't happen when select is enabled

jQuery uses the mouseover/mouseout events internally to realize the .hover() method (those events + some code simulate the mouseenter/mouseleave event behavior as known from IE). If the select element is enabled or there is some margin around the select all is fine in all browsers.

If the margin is 0 and the select is disabled FF/Chrome (WebKit?) fail to fire the correct events (Chrome actually fires none). This is probably a side-effect of the fact that browsers don't trigger (ignore) most mouse events on disabled elements. Only that FF/Chrome in this case overshot the mark by not firing the events when moving onto/off a disabled select element.

So this isn't a jQuery bug and should be to the appropriate browsers bug trackers. I'm not closing this one yet to give others time to weigh in one this.

Reduced test cases:
test case with jQuery
test case without jQuery (which proofs it's not a jQuery bug)

comment:2 Changed 9 years ago by jitter

Keywords: browser-bug browser-chrome browser-firefox added

comment:3 Changed 9 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.