Manual scroll should cancel/override our scroll?
See original GitHub issueWith the current implementation, if the user does a manual scroll while the element is being scrolled by scrollIntoView
, there is a jank and zig-zag scrolling, which I think is because scrollIntoView
is trying to finish its scroll. Can we have an option to discard the automated scroll once user does a manual scroll?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to cancel a javascript function if the user scrolls the page
How would I go about cancelling this action if the user scrolls manually before the 5s is elapsed. Reason being if the user...
Read more >Element.scroll() - Web APIs - MDN Web Docs
Chrome Edge
scroll Full support. Chrome61. Toggle history Full support. Edge79. T...
options.behavior parameter Full support. Chrome61. Toggle history Full support. Edge79. T...
options.left parameter Full...
Read more >Installing & Configuring our Cancel Override Add-on
The first step to set Cancel URL is to go to MemberPress → Settings → Account, scroll down to the "Cancel Override Settings"...
Read more >Scroll - LVGL documentation
In LVGL scrolling works very intuitively: if an object is outside its parent content area (the size without padding), the parent becomes scrollable...
Read more >Scrollbar | Unity UI | 1.0.0 - Unity - Manual
A significant difference between the Scrollbar and the similar Slider control is that the Scrollbar's handle can change in size to represent the ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Do you want it to finish immediately or just completely take over the users inputs and complete the animation?
For instant completion, you can do:
which will instantly set the scroll to the correct position when the user attempts to override it.
Alternatively, For scroll-jacking, I have a few suggestions:
Option 1. Don’t scroll jack. Option 2. If you must scroll-jack, bind your own handlers to prevent scroll events from hitting scroll-into-view and remove them when scrolling is complete, something like:
The above is untested, consider it psudocode. It’s also horrific and I highly recommend you don’t do it.
Hey, thanks for the find,
This already exists for touchstart, just needs to be added for mousewheel.
Send a pr or I’ll get to it soon.