Mouseout fires incorrectly and with wrong PageY coords and wrong relatedTarget

RESOLVED WORKSFORME

Status

()

Core
DOM: Events
--
major
RESOLVED WORKSFORME
11 years ago
10 years ago

People

(Reporter: Jake Olefsky, Unassigned)

Tracking

Trunk
PowerPC
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

11 years ago
Please see the attached url for a reduced testcase.  

I would like to use javascript to reveal a hidden element and then hide that element when the user moves their mouse outside of it. Many sites use this to make submenus. 

Unfortunately, the javascript mouseOut event is firing as soon as any mouse movement occurs, even if that movement remains inside the element.  Furthermore, the 'relatedTarget', 'PageX' and 'PageY' values are incorrectly set.  

It appears to me that the problem has something to do with relative vs absolute mouse coordinates because the PageX and PageY values are not set correctly. PageX and PageY are supposed to be with reference to the page, but they are being set in reference to the element. When the mouse moves, Firefox is taking the relative mouse coordinates (top left=element) and using them to find the element at that position in the absolute reference frame (top left=page). Naturally, this located element will be outside our box and so Firefox fires the MouseOut with 'relatedTarget' set to the element found in absolute reference.

If I am correct, the fix would be to have Firefox correctly set PageX and PageY and to use these correct values to do the lookup to determine if we are outside the related container.

I am using Firefox 3b1 on Mac OS X 10.5.1 (Leopard). It works in Firefox 2.
(Reporter)

Comment 1

11 years ago
I just tested this on a PC and could not get it to misbehave, so it must be a
Mac only bug.  Therefor, I am switching the Component to "OS Integration".
Component: General → OS Integration
QA Contact: general → os.integration
Component: OS Integration → DOM: Events
Product: Firefox → Core
QA Contact: os.integration → events
(Reporter)

Comment 2

10 years ago
Seems to be fixed with b3.
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Resolution: FIXED → WORKSFORME
You need to log in before you can comment on or make changes to this bug.