View Full Version : Firefox, scroll wheels, and onmouseover

12-15-2005, 06:56 PM
It recently came to my attention that, should the user's pointer come onto an element by the use of the mouse wheel in Firefox, the onmouseover event doesn't fire until the user moves said pointer. Just out of curiosity, is there any way around this?

12-16-2005, 08:06 AM
Isn't that annoying? I doubt that the obvious course (using the onscroll event coupled with a mouse coordinate check against the position and size of the element in question) would work as FF is also sketchy on detecting the onscroll event, if memory serves. Even if it did work, it would be quite a piece of coding. Depending upon how 'mission critical' this is, it might be worth investigating as FF does support the onscroll in some situations, I think. I'm remembering this all vaguely from Quirksmode.org's events section and bitter personal experience. I think I ended up, in my particular instance, finding some other event to hang my hat on in FF.

To that end, is there something concrete involved in this exercise and if so, could you provide a link to it?

12-16-2005, 01:25 PM
No, nothing concrete. I just noticed it, and wondered for possible future reference if it were bypassable. I considered adding "without rewriting the event handler" into that post, but didn't. Luckily, as it happens :p

12-16-2005, 02:04 PM
Just thinking about a similar situation I ran across rather recently. I was modding up the Switch Menu II script here at DD. Unlike the the original, it doesn't collapse previous. That's what the OP wanted. The script initializes each header onmouseover to prepare it for the onclick event. With those modifications added, it could happen that upon collapse of a previous menu and the expansion of the current, the mouse would be over a third header. FF would not detect this fact until the mouse was actually moved (IE was fine with it). In that case I was able to use the onmousedown event to compensate.

01-18-2006, 04:48 PM
I thought I'd better resurrect this ancient thread to point out that this is fixed in FX1.5.