Ticket #7216 (closed defect: fixed)

Opened 5 months ago

Last modified 4 months ago

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

Reported by: doughays Owned by: doughays
Priority: high Milestone: 1.2
Component: Events Version: 1.1.1
Severity: major Keywords:
Cc:

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

7216.html (0.6 kB) - added by doughays 5 months ago.
recreate testcase - patch the path to dojo.js before running
7216.patch (0.8 kB) - added by doughays 5 months ago.
patch to event.js

Change History

Changed 5 months ago by doughays

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

Changed 5 months ago by doughays

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 5 months ago by doughays

patch to event.js

Changed 5 months ago by doughays

  • summary changed from event.js: onmouseenter/leave broken on Firefox 2 to [patch][ccla] event.js: onmouseenter/leave broken on Firefox 2

Changed 5 months 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)

Changed 5 months ago by doughays

  • owner changed from sjmiles to doughays
  • status changed from new to assigned

Changed 5 months ago by doughays

  • status changed from assigned to closed
  • resolution set to fixed

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

Changed 5 months ago by doughays

  • milestone changed from tbd to 1.2

Changed 4 months ago by blowery

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

Changed 4 months ago by doughays

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

Note: See TracTickets for help on using tickets.