feoblog
feoblog copied to clipboard
Fix Chrome scroll-up with mouse wheel
In my current implementation of #69, scrolling up in chrome with the mouse wheel results in very odd behavior. (using PageUp or the up arrow does not.)
Seems to be a bug in the way Chrome's smooth scrolling interacts with calls to window.scrollTo. If I turn off smooth scrolling in the browser's settings, the behavior disappears.
I should probably write up a Svelte playground example and submit a bug report to Chrome.
Would love to find a workaround in the meantime.
The issue seems to be trying to be trying to compensate for adding items above the view port while scrolling is happening. The fix/compromise is to only load items once scrolling has stopped.