I have an element with a title
attribute (ie, a tooltip), wrapped in some container:
<div id="foo">
<input type="text" title="A tooltip" />
</div>
and I attach a "mousemove"
event listener on the container and stop event propagation:
document.getElementById('foo').addEventListener(
'mousemove',
function(e) { e.stopPropagation() },
false
)
This combination of stopping propagation of "mousemoves" on the container now prevents the tooltip from showing up for the inner textbox, in Firefox 2 and upwards. I've tried FF 2[.0.0.20], 3[.0.11], and the latest 3.5 (Windows Server 2003, XP).
As a quick exercise, Firefox users can see this bug in action by running the following equivalent logic as above in your address bar:
javascript:void($('div.vote').mousemove(function(e){ e.stopPropagation() }))
Now mouseover any of the vote up, vote down, or star (favorites) icons for this question. The tooltips no longer appear. Again, in Firefox only.
Does anyone have a workaround for this behavior/bug in Firefox? Has anyone else witnessed this?
Update: It appears Firefox uses "mouse stopped moving" to trigger tooltips in the browser chrome (eg back/forward buttons). See https://bugzilla.mozilla.org/show_bug.cgi?id=82953. However I can't tell if this affects the DOM.