navit-gps / website

The sourcecode of the Navit website
http://navit-gps.github.io/website/
1 stars 5 forks source link

Remove JS-enforced smooth scrolling #15

Open ElementW opened 3 years ago

ElementW commented 3 years ago

Forcing smooth scroll through JS libraries is a usability nightmare.

Not only does it never honor the browser/OS' smooth scrolling style, distance and speed curve, making the site an irritating experience, some people explicitly disable smooth scroll based on preference.

In addition since it forces the browser to run many sequential window.scrollTo() calls, it absolutely destroys any performance optimization the browser layout engine & renderers already implement in their native smooth scroll implementation; e.g. only switching viewport area twice in the entire smoothed scroll interaction, where this forces a recompute for every. single. damn. scroll. increment.