Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#4307 closed enhancement (fixed)

onMouseEnter / onMouseLeave x-browser support

Reported by: Sam Foster Owned by: alex
Priority: high Milestone: 1.0
Component: Events Version: 1.0
Keywords: Cc: Sam Foster
Blocked By: Blocking:

Description (last modified by bill)

IE implements the onmouseenter/leave pair of events which do what most people *mean* when they register onmouseover/out - fire only when the mouse enters that element, and leaves it (vs the extra events that are generated by mouseover/out on child elements). Mouseenter/leave events do not bubble/propagate.

MSDN link: http://msdn2.microsoft.com/en-us/library/ms536945.aspx (according to google, its down for me today) Apparently, the same events are available in Mono, and possibly elsewhere.

It would be great to be able to register handlers for these events in dojo - across dojo's supported browsers. Either in event.js, and/or in dijit/_Templated.js

Change History (17)

comment:1 Changed 12 years ago by alex

Status: newassigned

comment:2 Changed 12 years ago by Ben Lowery

This is already implemented inside the dnd code, fwiw. Should just be a matter of moving it and exposing it?

comment:3 Changed 12 years ago by Ben Lowery

Possible code at http://blog.blowery.org/2007/06/04/monday-the-4th/

It's my code and I'd willingly donate it to Dojo. :)

comment:4 Changed 12 years ago by alex

(In [10592]) convert widgets to use onmouseenter and onmouseleave as apropriate. Refs #4307

comment:5 Changed 12 years ago by alex

Resolution: fixed
Status: assignedclosed

(In [10593]) add support for onmouseenter and onmouseleave to all DOM Nodes which are dojo.connect()-ed to. Fixes #4307

comment:6 Changed 12 years ago by alex

(In [10594]) add onmouseenter and onmouseleave to the shortcuts provided by NodeList?. Refs #4307

comment:7 Changed 12 years ago by alex

ben: went with your solution (roughly). Thanks for pointing me at it.

comment:8 Changed 12 years ago by haysmark

Priority: normalhigh
Resolution: fixed
severity: normalmajor
Status: closedreopened

[10592] causes ComboBox? to throw DOM exceptions in FF2. Seems related to _FormWidget mouse handling.

Refer to http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/form/test_ComboBox.html

comment:9 Changed 12 years ago by haysmark

To reproduce, just move your mouse over a ComboBox? and check the error log.

comment:10 Changed 12 years ago by bill

(And same thing for Spinner, see test_Spinner.html)

comment:11 Changed 12 years ago by guest

Please see:

https://bugzilla.mozilla.org/show_bug.cgi?id=208427

This IS a firefux bug and a regression of http://trac.dojotoolkit.org/ticket/1807

The simplest way to handle the error is to use a try, catch statement.

jbondc

comment:12 Changed 12 years ago by bill

(In [10701]) Disable onmouseenter and onmouseout until #4307 is fixed on FF. (Refs #4307.)

comment:13 Changed 12 years ago by alex

Resolution: fixed
Status: reopenedclosed

(In [10981]) re-enable onMouseEnter/onMouseLeave, but this time with some smarts about FF's bugs. Fixes #4307

comment:14 Changed 11 years ago by Adam Peller

Cc: Sam Foster added

fyi.

comment:15 Changed 11 years ago by Adam Peller

meant to make note of #5464

comment:16 Changed 11 years ago by bill

Description: modified (diff)

See also #7216.

comment:17 Changed 11 years ago by bill

(In [14530]) Take advantage of onMouseEnter/onMouseLeave. Refs #4307 !strict

Note: See TracTickets for help on using tickets.