Open Bug 731634 Opened 12 years ago Updated 2 years ago

using <select> inside div triggers jQuery's .hoverOut() event

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86_64
Windows 7
defect

Tracking

()

Tracking Status
platform-rel --- +

People

(Reporter: gorpacrate, Unassigned)

Details

(Whiteboard: [platform-rel-jQuery])

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11

Steps to reproduce:

Example:
http://jsfiddle.net/j5Yee/1/

Open console and see what happens when click on select and move cursor to it's content.


Actual results:

jQuery triggers hoverIn/hoverOut.


Expected results:

Should not. Because mouse cursor doesn't leave parent's borders.
Whiteboard: [platform-rel-jQuery]
platform-rel: --- → ?
Yeah, this still reproduces and seems to be consistent across Mac and Windows.
Status: UNCONFIRMED → NEW
platform-rel: ? → +
Ever confirmed: true
Rank: 35
Component: DOM: Events → Event Handling
Jessica, just a heads up: this may also affect the date/time widgets in e10s.
Flags: needinfo?(jjong)
Summary: using select inside div triggers jQuery's .hoverOut() event → using <select> inside div triggers jQuery's .hoverOut() event
(In reply to Andrew Overholt [:overholt] from comment #2)
> Jessica, just a heads up: this may also affect the date/time widgets in e10s.

Thanks for the info.

Yep, tested with date/time widgets on Nightly and got the same results. But actually, this can be reproduced on e10s and non-e10s. Since select uses xul menupoup and date/time widgets use xul panel, I wonder what is the expected behavior when the mouse moves on top a floating window, even though it is inside the parent's border.

Another note is, Chrome has the same issue with input type=date (but not with select), got hoverIn/Out when moving the mouse to the calendar.
Flags: needinfo?(jjong) → needinfo?(overholt)
Olli mentioned it's a bit ambiguous since the actual <select> widget and the drop down choices are technically separate widgets (like the date/time situation). Maybe he can shed some light on what we should do here.
Flags: needinfo?(overholt) → needinfo?(bugs)
Would it be horrible to treat popup as modal dialogs, and when open, we wouldn't change the state at all in parent. That shouldn't be very hard to implement.
Flags: needinfo?(bugs)
This needs some testing in other browsers and then figure out what approach could be used.
Component: Event Handling → User events and focus handling
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.