Closed Bug 373518 Opened 16 years ago Closed 16 years ago

event.relatedTarget is never set when leaving popup


(Core :: DOM: Core & HTML, defect)

Windows XP
Not set





(Reporter: gomita, Assigned: emaijala+moz)



(Keywords: regression, testcase)


(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv: Gecko/20070219 Firefox/ webaroo/1.2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a3pre) Gecko/20070308 Minefield/3.0a3pre

When I leave popup, mouseout event is fired but never have the relatedTarget on Trunk builds.
This makes impossible to figure out where I am after leaving popup.

Reproducible: Always

Steps to Reproduce:
1. Open the upcoming testcase.
2. Right-click to show popup.
3. Hover on popup.
4. Leave popup.
Actual Results:  
The textbox showing the relatedTarget for mouseout events are:
menuitem > popup > null

I get this result on Firefox 3.0a3pre.

Expected Results:  
The textbox showing the relatedTarget for mouseout events are:
null > menuitem > popup > page

I get this result on Firefox

I don't know this bug is a regression on trunk build or not.
Attached file Testcase
Version: unspecified → Trunk
The fix for bug 321098 made the Windows widget layer behavior consistent with Linux, and indeed this problem is also seen in gtk builds. I'd say this is a problem of event state manager. I'll try to see if I can find a way to fix it.
Ever confirmed: true
Assignee: general → emaijala
Keywords: regression, testcase
Attached patch Possible patchSplinter Review
Roc, do you think we could do something like this? It fixes this problem and doesn't regress bug 321098, but would it cause something else to break?
Attachment #258949 - Flags: review?(roc)
If there's a menu showing, and the mouse is over a content document, and you move it into the menu, does the content document get a mouseout event with the menu content as the relatedTarget? I'm afraid it might. That would be very bad.
No, in that case relatedTarget is null. I tested by adding 


to page in the test case.
Apparently because the notification is done at <> and the target is never relayed there.
Closed: 16 years ago
Resolution: --- → INVALID
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.