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

Firefox Windows: Slimscroll scrolls whole page #289

Open
PinkTiu opened this issue Sep 7, 2017 · 4 comments
Open

Firefox Windows: Slimscroll scrolls whole page #289

PinkTiu opened this issue Sep 7, 2017 · 4 comments

Comments

@PinkTiu
Copy link

PinkTiu commented Sep 7, 2017

Hey,

if you hover over the slimscroll content and start to scroll not only the slimscroll content is moving but also the whole page. This feels a bit strange. The expected behavior would be that only the slimscroll content scrolls and the page does not.

This only happens in Firefox running under Windows. In Chrome and Edge this works fine. With Firefox running under macOS or Linux this works fine, too.

You can fix the problem the following:
After line 394 in the current source code you have to add
target.addEventListener('MozMousePixelScroll', _onWheel, false);
This solves the problem for me.

@PinkTiu
Copy link
Author

PinkTiu commented Sep 11, 2017

ping @rochal

@Sh2dow
Copy link

Sh2dow commented Feb 1, 2018

Thanks! @PinkTiu , your fix helped me too!

@Brilliant16
Copy link

Brilliant16 commented Apr 6, 2018

@PinkTiu this code works but another problem occur that mouse wheel unexpectedly scroll. If I scroll it will go on bottom in firefox

Even not following wheelStep: 20 (defauklt value) on firefox

@karlcow
Copy link

karlcow commented Aug 14, 2018

function attachWheel(target)
{
if (window.addEventListener)
{
target.addEventListener('DOMMouseScroll', _onWheel, false );
target.addEventListener('mousewheel', _onWheel, false );
}
else
{
document.attachEvent("onmousewheel", _onWheel)
}
}

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

No branches or pull requests

4 participants