Bug 7701 - mouseout sent to the wrong element when layout changes simultaneously
Summary: mouseout sent to the wrong element when layout changes simultaneously
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 420+
Hardware: Macintosh OS X 10.4
: P3 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-10 11:16 PST by Jacob Lukas
Modified: 2006-03-20 12:47 PST (History)
2 users (show)

See Also:


Attachments
Reduced test case (1.37 KB, text/html)
2006-03-10 11:16 PST, Jacob Lukas
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jacob Lukas 2006-03-10 11:16:06 PST
Using Javascript onmouseover/onmouseout and CSS :hover at the same time sometimes results in onmouseout not working.
Comment 1 Jacob Lukas 2006-03-10 11:16:52 PST
Created attachment 6989 [details]
Reduced test case
Comment 2 Geoffrey Garen 2006-03-10 11:34:05 PST
That's a great test case.

Step 3 should read: "Mouse right until the cursor is below Three but still over two, then mouse up. Two should disappear, but doesn't."
Comment 3 mitz 2006-03-10 12:49:40 PST
This test case is a great example of what the comment in FrameView::dispatchMouseEvent() says about not caching the old mouse-over node.

In this case, as the mouse enters "Three", the code tries to calculate which node the mouse was previously in, but while doing this, first of all it updates the document's layout applying to  the already-updated hover states. According to the new layout, the previous mouse position was in "Four", so "Three Four" is sent a bogus mouse out event, and "One Two" never gets one.
Comment 4 Jacob Lukas 2006-03-10 14:17:11 PST
note that this test case works correctly if either the css or javascript hover is removed. only the combination of them brings out this bug.
Comment 5 Alexey Proskuryakov 2006-03-20 12:47:09 PST
Fixed, patch in bug 3439