Skip to main content

Bug Tracker

Side navigation

#8308 closed bug (invalid)

Opened February 17, 2011 10:45PM UTC

Closed March 10, 2011 08:05AM UTC

Last modified March 14, 2012 11:35AM UTC

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
Attachments (0)
Change History (3)

Changed February 19, 2011 12:08PM UTC by jitter comment:1

component: unfiledevent
owner: → 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)

Changed February 23, 2011 12:43AM UTC by jitter comment:2

keywords: → browser-bug browser-chrome browser-firefox

Changed March 10, 2011 08:05AM UTC by trac-o-bot comment:3

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!