Popper-core: Scroll lag due to `updateBound` on `scroll` event

Created on 29 Apr 2018  路  7Comments  路  Source: popperjs/popper-core

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 [email protected] as part of the Ember library [email protected].

Most helpful comment

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.

All 7 comments

Thank you for your issue.

Unfortunately I can't answer to all the reported issues without a little help from you.
Please, make sure to follow the issues template when you submit a new issue, in this way I will already have all the informations needed to understand the problem and help you with it.

I'm closing this issue for now, but feel free to open a new one making sure to follow all the instructions!

Thank you for your understanding.

@FezVrasta which part of the issues template did I not follow? Do you require a CodePen for every issue?

Yes I need a codepen to see the problem. Thanks

So then why didn't you close this bug?

Because I already know what that bug is.

Hey I'm having the same problem and would like to expand on this issue.

I'm using vue-tooltip-directive, which is just a directive wrapper for Poppers.js.

Here is a Codepen showing this issue.

The lag seems to be coming from a scroll listener on the parent for each child.

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cixonline picture cixonline  路  5Comments

FezVrasta picture FezVrasta  路  5Comments

FezVrasta picture FezVrasta  路  3Comments

Johann-S picture Johann-S  路  3Comments

ConneXNL picture ConneXNL  路  3Comments