question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Scroll lag due to `updateBound` on `scroll` event

See original GitHub issue

CodePen demo

none

Steps to reproduce the problem

  1. Open popper with 100 items and overflow-y: scroll on the contents.
  2. 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:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
ralphpigcommented, Jun 7, 2018

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.

3reactions
FezVrastacommented, Apr 30, 2018

Because I already know what that bug is.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found