Bug 4117 - :hover, onmouseout, and onmouseover events don't trigger when objects move under mouse
Summary: :hover, onmouseout, and onmouseover events don't trigger when objects move un...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 412
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://samrod.com/random/handlevent.html
Keywords: InRadar
: 4109 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-07-23 17:51 PDT by Samrod
Modified: 2022-07-06 11:41 PDT (History)
13 users (show)

See Also:


Attachments
onMouseOver causes page to scrollby() onMouseOut doesn't fire (2.65 KB, text/html)
2005-11-03 22:24 PST, Arvind Satyanarayan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Samrod 2005-07-23 17:51:50 PDT
If the user doesn't move the mouse but an object with either :hover, onmouseout,
or onmouseover slides under it, none of the events are triggered.

However, the events are trigged if objects slide under the mouse by a page
scrolling action.
Comment 1 Samrod 2005-07-23 18:15:31 PDT
*** Bug 4109 has been marked as a duplicate of this bug. ***
Comment 2 Samrod 2005-08-20 19:25:19 PDT
This behavior has been corrected in Gecko 1.8 as you can see in the test case. 
Not sure what influence this has on the bug's priority level for WebKit.  But
just thought I'd mention it.
Comment 3 Joost de Valk (AlthA) 2005-09-03 13:48:04 PDT
I don't know if this is intended behavior, but the testcase is good and i think it should work.
Comment 4 Samrod 2005-09-03 18:57:51 PDT
Are you saying it's been fixed in the release or an unreleased build of WebKit?
 Because it's sure not behaving properly in Safari 412.5, Apple's latest release.
Comment 5 Arvind Satyanarayan 2005-11-03 22:24:41 PST
Created attachment 4587 [details]
onMouseOver causes page to scrollby() onMouseOut doesn't fire

There are two arrows on either side of the screen that should scroll the
images. What should happen is as you hover, the images should scroll, using
scrollby() and setTimeout(), and when you move away from the arrows, they
should stop scrolling, using clearTimeout(). This works fine in Firefox but not
in Safari, I don't think onMouseOut is being fired.
Comment 6 Eric Seidel (no email) 2005-12-27 14:37:15 PST
This attached test case is not at all clear to me.  http://samrod.com/random/handlevent.html works well 
though.
Comment 7 Joost de Valk (AlthA) 2005-12-27 22:12:53 PST
Put your mouse in the middle of one of the moving lines and don't move it, when it moves under your 
pointer, :hover will not be triggered, when you move over it yourself, it will. It's a good testcase, but i 
don't think this bug needs a lot of attention, since this is behavior that won't be noticed so often. 
Changing to p4 and trivial, until someone convinces me otherwise ;)
Comment 8 Samrod 2005-12-27 23:10:59 PST
It was a significant enough bug to have been corrected sometime between Firefox
1 and 1.5.
Comment 9 Joost de Valk (AlthA) 2006-01-16 05:23:06 PST
this happens in another fashion too, with links that aren't even moving:

1. pick any link that changes color when you move over it,
2. cmd-tab to another program so that it appears under your mouse pointer,
3. move your mouse out of the safari window,
4. tab back

the link will still be coloured. To try this use http://dev.outbreak.nl/webkit/. Moving your mouse pointer 
into the right frame will also leave the link in the left frame colored when you switch back. Since this will 
happen more often, i'm upgrading priority and severity.
Comment 10 Johan Bergström 2006-01-27 12:55:41 PST
I can make similar stuff happen by;

1. Create an object with an onmouseover trigger
2. Enter that page with your point above the object, the object does not start with onmouseover
3. Move pount around inside that object, onmouseover still doesn't trigger.
4. Position your pointer outside the object, then move it above - onmouseover triggers.

Firefox enters page with onmouseover triggered, so does Opera. Havent tried the behaviour on IE.
Comment 11 Alexey Proskuryakov 2006-03-20 13:00:10 PST
This can also be observed when manually running the tests landed with bug 3439 (fast/events/mouseover-mouseout.html). One needs to move the mouse quite slowly to see this, though.

There are a lot of loosely related issues gathered there, but it's not at all obvious which of them are really the same. Anyway, I think they warrant a P2 together :)
Comment 12 Brett Wilson (Google) 2006-11-29 12:24:01 PST
See also bug 11705 which deals with the way these mouse events are dispatched when a DOM mutation occurs.
Comment 13 Julian Hollmann 2012-11-05 02:29:19 PST
This bug still exists, please see my testcase: http://jsfiddle.net/qLCY3/4/
Comment 14 Den 2013-02-21 00:56:08 PST
Same thing here. Put cursor into yellow circle and wait for the rectangle to come over the circle. :hover is not triggered until you move mouse.
http://jsfiddle.net/CamaroSS/ZUw65/12/
Comment 15 Giulio Bonanome 2014-01-02 11:47:15 PST
Also :hover is not triggered if the page load the element under the mouse. It seems that :hover is triggered only on mousemove.
See http://jsfiddle.net/4XRUf/1/ (from http://stackoverflow.com/questions/20886903/css-hover-works-only-when-mouse-moves)
Comment 16 Nicolás Castellanos 2018-09-11 13:19:17 PDT
Still happen on Safari
Comment 17 Brent Fulgham 2022-07-06 11:40:59 PDT
This is still happening in Safari 15.
Comment 18 Radar WebKit Bug Importer 2022-07-06 11:41:49 PDT
<rdar://problem/96535959>