I find this problem after my firefox is automatically updated to FF17, MAC, OSX 10.8.2.
Any suggestion and advice?
Problem:
I am using javascript preventDefault (); and stopPropagation (); to cancel the default scroll event using the mouse wheel, it works fine. But when the mouse is above the flash lens and the mouse wheel scrolls, it does not work.
In fact, I have a flash panel that can be controlled by the mouse wheel. The flash object is embedded in the middle of the html document, which you need to scroll in the browser to view the contents of the flash memory. When I focus on flash content and scroll the mouse wheel, the browser also scrolls and makes the contents of the flash memory out of sight.
Reproduce the problem:
1. Put a simple empty flash object at the very bottom in html. Make sure you need to scroll down to view the flash object in the browser.
To simplify the explanation, you can use this javascript to stop all mouse actions on the page: (please press the Space bar to reach the flash object at the very bottom in html, if necessary)
window.addEventListener ('DOMMouseScroll', wheel, false); window.addEventListener ("mouse wheel", wheel, false),
window.addEventListener ('MozMousePixelScroll', wheel, false); window.addEventListener ("wheel", wheel, false),
function cancelEvent (e) {e = e? e: window.event; if (e.stopPropagation) e.stopPropagation (); if (e.preventDefault) e.preventDefault (); e.cancelBubble = true; e.cancel = true; e.returnValue = false; return false; }
The mouse will roll over to the flash object and use the scroll wheel, you will see that the browser also scrolls.
Expected Result:
The mouse wheel controls only the flash object, but not the browser specified in the script above.
source share