Closed Bug 418280 Opened 17 years ago Closed 16 years ago

Bad relatedTarget when mouse event occurs from one input field to another

Categories

(Core :: DOM: Events, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 101197

People

(Reporter: mattcoz, Assigned: smaug)

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b3pre) Gecko/2008020404 Minefield/3.0b3pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b3pre) Gecko/2008020404 Minefield/3.0b3pre

This is similar to the issue in bug 381825.  When you have a mouseover/out event from one input to another, sometimes you get a bad relatedTarget which causes an exception to be thrown when accessing it.

Reproducible: Sometimes

Steps to Reproduce:
1. move mouse quickly from one input to another
Actual Results:  
If done right, you will get mouseover/out events with a bad relatedTarget.

Expected Results:  
The relatedTarget should be the input field, not the secret div.
A *minimal* testcase would be useful here.
Sorry, something like this should work, requires Firebug for the console logging:

<html>
<body>
<input type="text" onmouseover="console.log(event.relatedTarget)" onmouseout="console.log(event.relatedTarget)"/><input type="text" onmouseover="console.log(event.relatedTarget)" onmouseout="console.log(event.relatedTarget)"/><br/>
<input type="text" onmouseover="console.log(event.relatedTarget)" onmouseout="console.log(event.relatedTarget)"/><input type="text" onmouseover="console.log(event.relatedTarget)" onmouseout="console.log(event.relatedTarget)"/>
</body>
</html>

Move the mouse quickly over the inputs and you should see the "anonymous-div" sometimes.  Moving left and right seems to do it more often, but I think it's just easier to move left and right quick enough.
Could you please upload a testcase which doesn't require any extra addons? 
Thanks.
Flags: blocking1.9?
Flags: tracking1.9? → blocking1.9?
I don't think this is a regression, so not sure about blocking1.9?
Not a blocker since it's not a regression. But wanted since we generally try to prevent you from getting hold of native anonymous nodes.
Assignee: nobody → Olli.Pettay
Flags: wanted1.9+
Flags: blocking1.9?
Flags: blocking1.9-
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
With Firebug Off, the test case in comment #5 crashes FF 3.5.1,

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1

http://crash-stats.mozilla.com/report/index/1fc40234-6c89-48f5-8293-abe332090722?p=1

access violation in wrapper code that blames mrbkap. Probably an easy one to fix if you can repro.

Happened the first two times I tried the test. It does require hand driven mouse motion, so driving events from the page would be better.
John, *please* file a new bug. CC me and mrbkap
See https://bugzilla.mozilla.org/show_bug.cgi?id=506838
See also bug 504814
Isn't this fixed on trunk?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: