strange mouseout/mouseover events without relatedTarget fired on link when positioned div is positioned on top of an iframe

RESOLVED WORKSFORME

Status

()

Core
Event Handling
RESOLVED WORKSFORME
14 years ago
4 years ago

People

(Reporter: Martin Honnen, Unassigned)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

14 years ago
This bug is about mouseout/mouseover events without relatedTarget occuring while
the mouse is over a link element in a div element that is positioned on top of
an iframe. These two events shouldn't occur in my view and do not occur if a
similar div with a link is simply positioned on top of the document body.

In more detail: the test case I am going to upload contains two positioned div
elements where the first div is positioned on top of an iframe, the second is
positioned on top of the body element.
When you slowly move the mouse from the top of the page over the second
positioned div and out again the event flow is as follows:

mouseover; target: [object HTMLDivElement]; relatedTarget: [object HTMLHtmlElement]
mouseout; target: [object HTMLDivElement]; relatedTarget:
http://javascript.faqts.com/
mouseover; target: http://javascript.faqts.com/; relatedTarget: [object
HTMLDivElement]
mouseout; target: http://javascript.faqts.com/; relatedTarget: [object
HTMLDivElement]
mouseover; target: [object HTMLDivElement]; relatedTarget:
http://javascript.faqts.com/
mouseout; target: [object HTMLDivElement]; relatedTarget: [object HTMLHtmlElement]

that is the events correctly fire in the sequence of the elements involved
(<html>-><div>->link-><div>-><html>).

When you do the same mouse movement over and out of the first div that is
positioned on top of an iframe then two additional events occur
(<html>-><div>->link->link->link-><div>-><html>):

mouseover; target: [object HTMLDivElement]; relatedTarget: [object HTMLHtmlElement]
mouseout; target: [object HTMLDivElement]; relatedTarget:
http://javascript.faqts.com/
mouseover; target: http://javascript.faqts.com/; relatedTarget: [object
HTMLDivElement]
mouseout; target: http://javascript.faqts.com/; relatedTarget: null
mouseover; target: http://javascript.faqts.com/; relatedTarget: null
mouseout; target: http://javascript.faqts.com/; relatedTarget: [object
HTMLDivElement]
mouseover; target: [object HTMLDivElement]; relatedTarget:
http://javascript.faqts.com/
mouseout; target: [object HTMLDivElement]; relatedTarget: [object HTMLHtmlElement]

that is while the mouse is already over the link element a mouseout (with
relatedTarget being null) and then a mouseover (with relatedTarget being null
again) occurs. Those additional mouseout/mouseover events are causing problems
for DHTML menu code for instance checking the relatedTarget to try to figure
whether the mouse leaves a menu div.
In my view it is a bug that those mouseout/mouseover events occur as the mouse
is already over the link and not leaving the link or moving over a child
element. Furthermore the event flow shouldn't differ between a div on top of an
iframe and a div on top of the body element.
Tested with Mozilla 1.8a and 1.7, both show the problem.
(Reporter)

Comment 1

14 years ago
Created attachment 162715 [details]
test case
We have existing bugs on things that are on top of iframes...
Whiteboard: DUPEME
(Reporter)

Comment 3

14 years ago
Maybe a dupe of https://bugzilla.mozilla.org/show_bug.cgi?id=136527, I will need
to check in detail when I have time.

Comment 4

13 years ago
WFM: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050412
Firefox/1.0+

I guess bug 125386 fixed this. Please reopen if you can reproduce with a trunk
build.

Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → WORKSFORME

Updated

4 years ago
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.