2 ms·
It doesn't sound like it from the article, but I wish other scrollbar misbehavior was included in this work. Scroll wheels and touch are not the only way people
by saltcured 8y ago
It doesn't sound like it from the article, but I wish other scrollbar misbehavior was included in this work. Scroll wheels and touch are not the only way people scroll! I wish they would also work on the broken scrollbar behavior when content is added to page while the scrollbar handle is being dragged. For example, pages which append new batches of content as you approach the bottom.
The symptom is that it treats the scrollbar position as a ratio of page length, and as the page length changes, the viewport is suddenly warped to a new position at the same ratio of the new page size. To fix this, I think it should continue to use the old page length to calculate scroll position until you release the drag. You won't always be able to scroll past the previous end of page in one movement, but the content visible in the viewport should remain coherently related to your drag motions.
I recognize that something has to be made inconsistent in the ratio-based scrollbar UX if the page length changes. I think having the scrollbar handle jump away from the mouse cursor on drag-release would be much less annoying than having the viewport jump around on each DOM edit. You can continue reading what you were reading and only be distracted when you need to go find the handle again to scroll further down, much like if you accidentally let your mouse drift out of the scrollbar and then released the drag.
- aidenn0 8y agoIndeed; they made tabs work similarly a long time ago (tabs do not resize when you close a tab until you move your mouse away) and this made closing tabs so much better. Infinite scrolling on sites is so painful when using the scrollbar.