Skip to content

Draft: Only change control values with scroll when focused

Draft because I'm waiting to see what happens with frameworks/kirigami!415 (merged).

Allowing controls to handle scroll events to change their values creates an un-resolvable UX conflict because sliders can be embedded into a scrollable view, and in this case, scrolling the view will unexpectedly change the values of any sliders that the cursor happens to pass over while the view is updating. This is especially severe for views with wide sliders that take up most or all of the horizontal space in a scrollable view, wherein scroll behavior is completely broken due to the conflict. The plasma-pa applet is one such example.

Disabling this behavior seems like an obvious solution, but inevitably we will discover the few users who use and like this behavior nd get complaints about it. So instead, this commit does something a bit tricky: it enables the behavior only if the control is focused. This allows you to focus a control to fine-tune its value with a scroll, but unfocused controls will ignore scroll events to avoid the conflict between "view scroll" and "change control values scroll".

BUG: 385270 FIXED-IN: 5.88

To test:

  • Scroll on the Audio Volume applet while it has enough devices to be scrollable and don't get driven mad
  • Scroll on the spinbox to change panel thickness once the Panel edit toolbar is visible and see that it still works because it has focus

cc @teams/usability

Edited by Nate Graham

Merge request reports