wessberg / scroll-behavior-polyfill

A polyfill for the 'scroll-behavior' CSS-property
MIT License
102 stars 17 forks source link

Polyfilled smooth scroll slower than native implementations with long distances #14

Open prietveld opened 4 years ago

prietveld commented 4 years ago

I found that current computations for the polyfilled smooth scroll behavior make scrolling take a long time to 'ramp up' when scrolling over longer distances, like 'back to top' from a long list (several screen lengths) of search results, which makes such an action seem unresponsive. This is different from implementations in Chrome and Firefox, which appear 'snappier' in these cases.

Would it be possible to take another look at the code for animated scrolling, or make this configurable?

eric-blue commented 3 years ago

noticing this too, slows down quite a bit when the page is only moderately long (mine is ~13,000 px)