Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#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)

7216.html (617 bytes) - added by Douglas Hays 11 years ago.
recreate testcase - patch the path to dojo.js before running
7216.patch (845 bytes) - added by Douglas Hays 11 years ago.
patch to event.js

Download all attachments as: .zip

Change History (11)

Changed 11 years ago by Douglas Hays

Attachment: 7216.html added

recreate testcase - patch the path to dojo.js before running

comment:1 Changed 11 years ago by Douglas Hays

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.

Changed 11 years ago by Douglas Hays

Attachment: 7216.patch added

patch to event.js

comment:2 Changed 11 years ago by Douglas Hays

Summary: event.js: onmouseenter/leave broken on Firefox 2[patch][ccla] event.js: onmouseenter/leave broken on Firefox 2

comment:3 Changed 11 years ago by bill

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 11 years ago by Douglas Hays

Owner: changed from sjmiles to Douglas Hays
Status: newassigned

comment:5 Changed 11 years ago by Douglas Hays

Resolution: fixed
Status: assignedclosed

(In [14472]) Fixes #7216 !strict. Check for a valid node before calling dojo.isDescendant to avoid FF2 bug.

comment:6 Changed 11 years ago by Douglas Hays

Milestone: tbd1.2

comment:7 Changed 11 years ago by Ben Lowery

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:8 Changed 11 years ago by Douglas Hays

If you check with an "if" then an exception will be thrown.

comment:9 Changed 11 years ago by bill

(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

Note: See TracTickets for help on using tickets.