#7216 closed defect (fixed)
[patch][ccla] event.js: onmouseenter/leave broken on Firefox 2
Reported by: | Douglas Hays | Owned by: | Douglas Hays |
---|---|---|---|
Priority: | high | Milestone: | 1.2 |
Component: | Events | Version: | 1.1.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Firefox 2 has a onmouseover/out bug where it spawns spurious events that have invalid relatedTarget values attached to the event object.
These bad events must be ignored in order for onmouseenter/leave to work correctly.
Attachments (2)
Change History (11)
Changed 14 years ago by
comment:1 Changed 14 years ago by
Run the test using Firefox 2 (I'm on winxp).
Move the mouse into the input box.
An enter console message is displayed (good), followed by a leave console message (very bad). When yoy mouse off the box, you get an enter message (bad), and a leave message (good).
This is only broken on Firefox 2. Other browsers including Firefox 3 are OK.
The fix is simple: check for a valid node in the mouseover/out handlers before calling isDescendant.
comment:2 Changed 14 years ago by
Summary: | event.js: onmouseenter/leave broken on Firefox 2 → [patch][ccla] event.js: onmouseenter/leave broken on Firefox 2 |
---|
comment:3 Changed 14 years ago by
This looks good to me; I think it can be checked in. Not sure if Scott will have time to review (IIRC he said that he was unfortunately too busy to work on stuff for the 1.2 release, although I think he did make some changes recently)
comment:4 Changed 14 years ago by
Owner: | changed from sjmiles to Douglas Hays |
---|---|
Status: | new → assigned |
comment:5 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:6 Changed 14 years ago by
Milestone: | tbd → 1.2 |
---|
comment:7 Changed 14 years ago by
Just curious, but why a try catch instead of an if test? try catch is relatively expensive in js... probably doesn't hurt, but it caught my eye.
also, you removed my thanks. :P
comment:9 Changed 13 years ago by
(In [16683]) Only do try/catch block for relatedTarget.tagName for FF2. It's not needed for FF3 and causes some issues. Refs #7216 and fixes #8555.
Also refs #8623 in that it fixes that issue (lingering hover effect on tree nodes) when firebug is enabled, but it's still failing when firebug is disabled as that's another issue.
!strict
recreate testcase - patch the path to dojo.js before running