Open Bug 1743069 Opened 4 years ago

Add a preference for ui.scrollToClick to scroll upon clicking the slider frame, but not upon clicking the slider thumb

Categories

(Toolkit :: UI Widgets, enhancement)

Desktop
Unspecified
enhancement

Tracking

()

UNCONFIRMED

People

(Reporter: aminomancer, Unassigned)

Details

See here: the ScrollToClick behavior scrolls upon clicking any place on the scrollbar frame, whether it's the slider frame or the thumb. I think an option should be provided such that the behavior is different depending on whether the frame was clicked or the thumb. For example, ui.scrollToClick = 2 would result in a behavior midway between 0 and 1.

On clicking the thumb, I would like it to work the same way as when ui.scrollToClick = 0 — the mouse drags the thumb without the frame first scrolling to ensure the thumb is centered under the mouse cursor. If you click on the edge of the thumb and drag from there, your mouse cursor would stay at the edge of the thumb. Just like how it works when ui.scrollToClick = 0.

But on clicking the slider (everywhere except the thumb), I would like it to work the way it does when ui.scrollToClick = 1 — the frame instantly scrolls commensurately to moving the thumb where the user clicked on the slider. It would of course scroll in such a way that the thumb ends up centered under wherever the user clicked... and from there, if user still holds down the mouse and begins dragging the thumb, the thumb would remain centered under the mouse cursor.

The only time it wouldn't center the thumb under the mouse cursor would be if the user clicked the thumb; at that point, nothing would happen at all unless user holds down the mouse button and drags. If user drags the mouse button 10px then the thumb would move 10px and scroll the frame proportionally. Upon releasing, the mouse cursor would be in the same vertical position relative to the thumb that it was in upon first clicking. Which is exactly what happens now when ui.scrollToClick = 0.


My reasoning for this is that ui.scrollToClick = 1 is more practical and useful, especially on very large pages, but causes very jerky behavior when clicking & dragging the thumb. Clicking the thumb just about anywhere causes a huge, jarring jump in scroll position as the thumb moves to center itself under the cursor. It gives me motion sickness, so I use ui.scrollToClick = 0 to avoid that.

But I find 0 to make the slider almost useless, since with this setting I can't really predict where clicking the slider frame is ultimately going to scroll the thumb (and page) to. To reach the same general location I'd reach if the setting was 1, I could click & hold, and keep holding until the thumb reaches the position I clicked. But 1) it's much slower on long pages, especially with default scroll settings, and more importantly 2) it virtually always "overshoots" the position I clicked, because of the way it's programmed, to scroll by a number of pages and to abide by the smooth scroll preferences.

If I'm at 25% scroll position and I click and hold the frame at around 50% scroll position, the final scroll position could end up being anywhere from 50% to like 60%. Without moving my mouse, the thumb could end up in a position way outside of my mouse cursor. Then if I click and hold again, it'll move the thumb up (in the other direction) and probably still overshoot the mouse cursor.

Actually, the only way it doesn't overshoot the mouse cursor is if (by coincidence) I wind up clicking somewhere on the frame that corresponds to a multiple of the exact minimum scroll amount, and if my smooth scrolling preferences result in a deceleration distance that, when multiplied by the ratio between the page height and the viewport height, is less than the height of the scrollbar thumb. The odds of that happening naturally would be really low, not sure I've ever seen it happen.

Of course you can also disable smooth scrolling altogether by setting general.smoothScroll.msdPhysics.enabled and general.smoothScroll.pages to false. However, I like the mass spring damper animation for mousewheel scrolling, and there's no way to disable it for ScrollToClick without also disabling it for mousewheel. Since I use the mousewheel more often than I use the scrollbar, it ends up being more practical for me to set ui.scrollToClick = 0. But it's unfortunate to have to compromise like that.

You need to log in before you can comment on or make changes to this bug.