Feature request: option to fire callback when no scrolling happened
See original GitHub issueI currently have a feature that toggles a boolean to ‘block’ scrollIntoView()
(and some other functions) from firing multiple times while it’s running, and then uses a callback to ‘unblock’ scrollIntoView()
and these other functions. However, in some cases, scrollIntoView()
doesn’t scroll (e.g., when isScrollable()
returns false). This is expected (in my case it’s a navbar that only is scrollable in mobile widths), but there’s not a clean way to fire my callback in this case, and thus not a clean way to unblock my functions that fire after the callback toggles the boolean.
Sorry if this example is unclear. The main point of it is that I’d like a way to fire a callback in a no-op case. I was thinking an additional type
might work.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
ScrollTrigger feature request: "onSnapInterrupt" callback - GSAP
Similar to the "onInterrupt" option for gsap tweens, "onSnapInterrupt" is a callback that fires when snapping is interrupted/cancelled due ...
Read more >Scroll event firing too many times. I only want it to fire a ...
It fires all sorts of intermediate scroll events and does not tell you when things are done moving. So, we come up with...
Read more >Quick Tip: How to Throttle Scroll Events - SitePoint
This technique helps with checking if we are at a specific part of the page. Given the size of the page, it takes...
Read more >With scrollBar: true, callbacks stop firing · Issue #1556 - GitHub
I've noticed that with the scrollBar option set to true, the seems to be an issue ... After that, the callbacks only fire...
Read more >Scroll Events and Intersection Observer - Beginner JavaScript
In this video we will learn about scroll events. A scroll event is when someone goes ahead and scrolls on the page or...
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
Sorry, I found an annoying mistake in my code. After fixing it, the problem stopped repeating itself. The library works as I expect
Thanks for that, Bug confirmed, test added, fix added, published as 1.9.6.