Closed Bug 373518 Opened 18 years ago Closed 17 years ago

event.relatedTarget is never set when leaving popup

Categories

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

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: gomita, Assigned: emaijala+moz)

References

Details

(Keywords: regression, testcase)

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2 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 2.0.0.2.

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.
Status: UNCONFIRMED → NEW
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 

onmouseout="handleMouseOut(event);"

to page in the test case.
Apparently because the notification is done at <http://mxr.mozilla.org/seamonkey/source/content/events/src/nsEventStateManager.cpp#2700> and the target is never relayed there.
Status: NEW → RESOLVED
Closed: 17 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.

Attachment

General

Creator:
Created:
Updated:
Size: