Comments (11)
Hi @jankohlbach !
Thanks for looking into it. I had not heard about this issue before but I think it would be great to find a fix for VirtualScroll.
I think the fix will probably use something similar to what's on this stackoverflow answer to toggle between wheelDeltaY and deltaY.
I am not sure when I will be able to incorporate this as a stable fix, so in the meantime, a temporary fix could be something like:
new VirtualScroll({
mouseMultiplier: isTrackpad && isFirefox ? 1/3 : 1
})
where isTrackpad
comes from the above stackoverflow link, and isFirefox
is obtained from user-agent sniffing.
1/3 is because I believe the trackpad will fire at 300% the rate of the mouse but I could be wrong - tweak at will.
Let me know if that works for you!
Edit: it looks like wheelDetaX/Y are deprecated so I might just remove them altogether. Just need to test a bit.
from virtual-scroll.
Hey @ayamflow,
thanks for the response :)
It's extremely busy for me as well right now, so don't worry.
Thanks for looking into it 💯
from virtual-scroll.
Hey @ayamflow ,
do you have any news regarding this? asking because the folks at locomotive are working on the issues and making updates, so maybe it would be nice if this is fixed
from virtual-scroll.
hey @jankohlbach,
I looked at https://locomotivemtl.github.io/locomotive-scroll/ on Chrome & Firefox and the scroll speed looks the same to me, on a trackpad.
Can you confirm that you see an obvious difference on this site between Firefox and other browsers? What OS are you on?
from virtual-scroll.
@ayamflow
hmm ... yeah it's pretty obvious 😅
I'm on windows 10, dell xps13, are you on a mac?
maybe it's even device related ...
from virtual-scroll.
Yep, I'm on mac.
I just gave it a try on Windows 10 with Parallels desktop and there was no noticeable speed difference either. It's the same trackpad tho so maybe it's a device thing, but it's surprising that it would only affect firefox 🤔
Does this shows isTrackpad: true
for you ? https://jsfiddle.net/ayamflow/j09qsrLd/7/ (when scrolling in the white rect)
I'm thinking I could expose another param trackpadMultiplier: 1 (default)
and let the user find the best value for their use case, as I don't want to add a breaking behavior.
from virtual-scroll.
as much as I'd like to see more people using firefox, in this case it's a good thing only few people (and even less with trackpad) are using it 😂
your fiddle shows nothing for me 🤔
maybe also your idea from above could be enough for the moment then ...
from virtual-scroll.
@jankohlbach you need to scroll in the white area for the jsfiddle to display something 👀
from virtual-scroll.
@ayamflow I promise you I don't see anything 😂 maybe onwheel doesn't capture the trackpad, but only mousewheel ...
or I just throw this specific laptop out of the window ...
from virtual-scroll.
Basically, if I'm in Firefox and using a trackpad, the scrolling is way too fast.
I think it is because this lib assumes the firefox is slow, and it isn't ¯\_(ツ)_/¯
firefoxMultiplier
: Firefox on Windows needs a boost, since scrolling is very slow. Defaults to 15.
and here I am, scrolling locomotive demo in firefox on windows to the bottom in a split-second :')
where
isTrackpad
comes from the above stackoverflow link
for me those snippets just do not detect a touchpad at all. they probably work on authors hardware only.
from virtual-scroll.
ah no, I take it back - not a firefox issue for me, locomotive demo scrolls super-fast in chromium as well
from virtual-scroll.
Related Issues (20)
- It is not working at all. I would like an example of how to use it. HOT 2
- Edge Bug HOT 1
- VirtualScroll is not defined HOT 1
- Is there anyway to check when scroll stops using the .on() method? HOT 1
- Add option to disabled keyboard control HOT 4
- Issue with mobile device HOT 1
- Broken when scroll back to top HOT 1
- Fake Scrollbar with `scroll` event? HOT 1
- How to disable virtual-scroll for touch-devices? HOT 1
- Check accessibility / Other ways to trigger scroll HOT 5
- firefoxMultiplier for Macs HOT 4
- Compiled script in npm registry HOT 1
- Example Next.js Typescript Hook
- Integration with GSAP ScrollTrigger HOT 5
- Ivy compiler compatibility
- Github lists 2.0.0 as latest release
- Allow to pass a custom element as event target HOT 1
- Start Scroll Event HOT 5
- IE Edge trackpad problem HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from virtual-scroll.