Turn off Luxy.js in Firefox
Opened this issue · 2 comments
EmilyChews commented
Hi,
Thanks for making such a wonderful resource.
Is there any way of turning Luxy off in Firefox? Firefox has is own native smooth scroll and luxy.js makes the native smooth scroll quite janky?
Many thanks
Emily
EmilyChews commented
Hi
I found a way around this:
var ff = !(window.mozInnerScreenX == null);
if (!ff) {
luxy.init({
wrapperSpeed: 0.08
});
}
min30327 commented
Hi emilyChewsCheese,
I did not know FireFox did that.
Thank you for sharing it.
The same case for Edge, and I avoid it as follows.
if(navigator.userAgent.match(/Trident\/7\./)) {
document.body.addEventListener("mousewheel", function() {
event.preventDefault();
var wd = event.wheelDelta;
var csp = window.pageYOffset;
window.scrollTo(0, csp - wd);
});
}