Scroll lag due to `updateBound` on `scroll` event
See original GitHub issueCodePen demo
none
Steps to reproduce the problem
- Open popper with 100 items and
overflow-y: scroll
on the contents. - Scroll, notice scroll lag
What is the expected behavior?
Scroll should not lag
What went wrong?
Scroll event fires updateBound which seems costly and pointless if the size of the popper doesn’t change.
Any other comments?
The scroll callback is bound here. Why do we need to updateBound on scroll? Can it be made opt-out if the user knows he will not need to be updating bounds?
I am using popper.js@1.14.1
as part of the Ember library tooltip.js@1.2.0
.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Scroll lag due to updateBound on scroll event #624 - GitHub
Open popper with 100 items and overflow-y: scroll on the contents. Scroll, notice scroll lag. What is the expected behavior? Scroll should not ......
Read more >How do I get rid of lag while using transform on scroll event?
The lag is caused by the timing function of the transition. You're using a cubic-bezier for that. you could try a bezier with...
Read more >Intermittent scroll lag with sites that listen for the JS scroll event?
I'm on a Mac, and I've just switched over to FF from Chrome. It's generally going great, but one slightly annoying thing is...
Read more >Document: scroll event - Web APIs - MDN Web Docs - Mozilla
The scroll event fires when the document view has been scrolled. To detect when scrolling has completed, see the Document: scrollend event.
Read more >Overlapping segments of 'monday.com/nhp/_next/static/chunks ...
In most cases you will not need this function, as it is called constantly, whenever ScrollMagic detects a state change event, like resize...
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 FreeTop 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
Top GitHub Comments
Was able to fix this with:
eventsEnabled: false
, which disabled scroll listeners.Not sure of other consequences, however, for a large list of scrollable Tooltips this works.
Because I already know what that bug is.