On Surface Pro 3 only with Firefox:
When you perform one-finger gestures on an element, the browser touchmove wheel events instead of touchmove or mousemove . How do you stop wheel behavior and allow one finger to always be considered a touch / mouse movement?
So, I want to consider one finger as a series of mousemove or touchmove instead of wheel events. I donβt want to swipe one finger to scroll the page if you scroll this element. This is easy to do in Chrome and IE11. This seems impossible right now in Firefox. The current one I think is a mistake, but maybe something is missing me.
Here is a simplified example:
http://codepen.io/simonsarris/pen/PwbdRZ
var can = document.getElementById('can'); can.addEventListener('mousemove', function(e) { // Will never happen on the Surface Pro 3 in Firefox // Will happen in IE11 though console.log('mouseMove') }); can.addEventListener('touchmove', function(e) { // Will never happen on the Surface Pro 3 in Firefox // Will happen in Chrome though console.log('touchMove') }); // Stops the window from scrolling in firefox when you swipe on the element // But stopping this does not allow the single touch gesture to register as mousemove or touchmove events can.addEventListener('wheel', function(e) { console.log('wheel') e.preventDefault(); }); // consider also the 'DOMMouseScroll' event, though preventing this event will not stop firefox from panning the page.
Since I prevent the default value from wheel , page scrolling stops when one finger scrolls up or down
Window scrolling stops in firefox if you slide your finger over the red box, but no mousemove or touchmove events will fire. (but mousemove will fire if you swipe horizontally, not vertically)
source share