Reported 1 November 2005 to Quirks Mode.
The above text input element has event listeners registered for both "mouseover" and "mouseout". One should see pairs of mouseover/mouseout events when the mouse enters/exits the text field (as one sees in IE 6). On Firefox 1.0.7, several strange things occur:
mouseover is followed by a mouseout, even while the mouse is still over the text field.mouseout event.relatedTarget.nodeName property, an exception is thrown.mouseover event is fired, this time with event.relatedTarget set to the same element as the element on which the event is registered.In order to respond to simply mouseover/mouseout events, one must perform both of the following:
event.relatedTarget set to the same element as the element on which the event is registered.event.relatedTarget.nodeName and, if an exception is thrown, ignore the event.This workaround is compatible with IE 6, as that browser does not send the extraneous events in the first place. This workaround is forward compatible only if Mozilla fixes the extraneous event bug when it fixes the event.relatedTarget.nodeName access bug.
Copyright © 2005 Garret Wilson