pradyunsg / furo

A clean customizable documentation theme for Sphinx
https://pradyunsg.me/furo/quickstart
MIT License
2.59k stars 301 forks source link

Adjusting "Back to top" to consider the `wheel` event #760

Open pradyunsg opened 5 months ago

pradyunsg commented 5 months ago

Discussed in https://github.com/pradyunsg/furo/discussions/421

Originally posted by **jdknight** April 16, 2022 The existing scroll handler logic ties everything to the [`scroll` event](https://developer.mozilla.org/en-US/docs/Web/API/Document/scroll_event). I'm wondering if it would be possible to adjust the "Back to top" implementation to also consider the [`wheel` event](https://developer.mozilla.org/en-US/docs/Web/API/Document/wheel_event) (when applicable), to help avoid rendering the back-to-top overlay when a page is scrolled via navigation events (back/forward; and menu clicks on the sidebar).