Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FF17 Fix #47

Closed
wants to merge 1 commit into from
Closed

FF17 Fix #47

wants to merge 1 commit into from

Conversation

hirbod
Copy link

@hirbod hirbod commented Dec 29, 2012

added new listener for FF17+ (works even with FF Aurora 19a2), fixes preventDefault on scroll

wheel does not work anymore / or at the moment.

try this instead:

var types = ['DOMMouseScroll', 'mousewheel', 'MozMousePixelScroll', 'wheel'];

MDN:
The DOM MozMousePixelScroll event is fired asynchronously when mouse wheel or similar device is operated. It's represented by the MouseScrollEvent interface.

If you want to prevent the default action of mouse wheel events on Gecko 17 (Firefox 17) or later, you need to call preventDefault() of wheel because if two or more wheel events caused only 1 pixel scroll, this event wouldn't be fired.

Hint:
So adding MozMousePixelScroll will fix this problem. But the speed is really high.. maybe some adjustments are required. I've also tried to use this whitout "wheel" and this works too. But i think upcoming releases will just use the wheel event.

Tested with FF17 and FF Aurora (19a2), Safari 6, current Chrome.. Works!

added new listener for FF17+ (works even with FF Aurora 19a2), fixes preventDefault on scroll
@ghost
Copy link

ghost commented Dec 30, 2012

After this change it seems that deltaX and deltaY are always 0 - tested under FF17.0.1 and IE 9

@hirbod
Copy link
Author

hirbod commented Dec 30, 2012

MozMousePixelScroll is just a legacy event till "wheel" works again...(dunno what happened..) MozMousePixelScroll works just basic.

https://developer.mozilla.org/en-US/docs/DOM/DOM_event_reference/MozMousePixelScroll
https://developer.mozilla.org/en-US/docs/Mozilla_event_reference/wheel

For now i think this is still a good workaround.. at least for the plugin "jScrollPane"...

@brandonaaron
Copy link
Contributor

Thanks. This is now resolved in 3.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants