I find this problem after my firefox automatically updated to FF17, MAC, OSX 10.8.2.
Any suggestion and tips ?
Problem:
I use javascript preventDefault(); and stopPropagation(); to cancel the default scroll event by mouse wheel, it work fine.
But when mouse over the flash object and scroll by mouse wheel, this is not working.
Indeed, I have a panel in flash which can controlled by mouse wheel. The flash object is embed in the middle of the html document, which you need to scroll down in the browser to view the flash content. When I focus on flash content and scroll by mouse wheel, the browser is also scrolling and make the flash content out of view.
Reproduce the problem:
1. Place a simple blank flash object in the very bottom in the html. Make sure you need to scroll down to view the flash object in the browser.
To make it easy to explain, you can use this javascript to stop all mouse wheel activity on the page: (please press "Spacebar" to reach flash object at the very bottom in the html, if needed)
window.addEventListener('DOMMouseScroll', wheel, false); window.addEventListener('mousewheel', 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; }Mouse roll over on the flash object and use the scroll wheel, you will find the browser is also scrolling.
Expected Result:
Mouse wheel only control the flash object, but not the browser by the above script.