Skip to content

kcms/colors: fix backtab on custom custom color btn

Christoph Wolk requested to merge cwo/plasma-workspace:colors_backtab into master

Reason for the change

When a custom custom accent color (i.e. not one of the pre-defined ones) is selected, the button for this becomes a split radiobutton/color picker button visually. It tries its best to hide this split nature from the interaction logic; namely by automatically passing focus to the button and passing clicks to it as well. It doesn't quite do a perfect job of it though. While the tab chain works forward, it doesn't in the other direction - pressing backtab causes the focus to land on the radiobutton, which passes it back to the button where it came from, and we're stuck.

Instead, just turn off activeFocusOnTab, and make sure it doesn't receive focus through clicking either by passing focus to the button when clicked – as there's no backclick, this one works.

Test plan

  1. Open kcm_colors, press the button with a color picker icon, and confirm a color.
  2. Press Shift-tab
  3. (without) can't backtab (with) can backtab

Screenshots or screen recordings

N/A

Bugs fixed

N/A

Merge request reports

Loading