Bug 515863 - System tray settings: search field for list of system try items loses focus after every key press
Summary: System tray settings: search field for list of system try items loses focus a...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 6.6.0
Platform: Other Linux
: HI normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2026-02-11 10:01 UTC by Tobias Fella
Modified: 2026-02-24 04:52 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.6.1
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Fella 2026-02-11 10:01:10 UTC
SUMMARY
The search field looses focus after every key press, if there is still an item in the list

STEPS TO REPRODUCE
1. Open system tray settings
2. search for e.g. "weather"

OBSERVED RESULT
After typing "w", the search field looses focus. After typing "e", the same happens. When now typing "q" (or something else that will lead to no search results), it will not loose focus

EXPECTED RESULT
No focus loss

SOFTWARE/OS VERSIONS
KDE Plasma Version: git master
KDE Frameworks Version: git master
Qt Version: git master
Comment 1 Nate Graham 2026-02-19 23:42:38 UTC
Can reproduce!
Comment 2 Nate Graham 2026-02-20 22:05:58 UTC
Caused by https://invent.kde.org/plasma/plasma-workspace/-/commit/f5cead581ec581cc31cd60a9403c45656ad46729

Somehow putting the InlineViewHeader in the header position of a ListView triggers this; when I move the whole InlineViewHeader outside, the issue doesn't happen.

Very weird issue.
Comment 3 Bug Janitor Service 2026-02-21 12:40:47 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/6331
Comment 4 cwo 2026-02-24 01:22:25 UTC
Git commit f2e84488ed5050156f94bf948541d0258a733b1e by Christoph Wolk.
Committed on 23/02/2026 at 22:55.
Pushed by cwo into branch 'master'.

applets/systemtray: reset currentIndex when searching

The header in the system tray config dialog is in the same FocusScope as
the ListView itself. If there is a currentItem, Qt will try to maintain
the same item as the currentItem, which gives it focus in its FocusScope
so the search field will lose focus after every key press; otherwise it
may set it to the first item, with the same result.

Instead, clear the currentIndex before searching - this way, focus will
stick on the search field until the user presses Down arrow to
intentionally interact with the results. Maintaing the currentItem on
search does not seem necessary; if the user already has selected the
item they want to interact with, they don't need to search for it
anymore, so if they're editing the search it's reasonable to assume they
don't care about whatever happened to be selected last.
FIXED-IN: 6.6.1

M  +6    -1    applets/systemtray/qml/ConfigGeneral.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/f2e84488ed5050156f94bf948541d0258a733b1e
Comment 5 Nate Graham 2026-02-24 04:52:03 UTC
Git commit 91264355a6eeb239a7fd759be60a75f18717af5d by Nate Graham.
Committed on 24/02/2026 at 04:51.
Pushed by ngraham into branch 'Plasma/6.6'.

applets/systemtray: reset currentIndex when searching

The header in the system tray config dialog is in the same FocusScope as
the ListView itself. If there is a currentItem, Qt will try to maintain
the same item as the currentItem, which gives it focus in its FocusScope
so the search field will lose focus after every key press; otherwise it
may set it to the first item, with the same result.

Instead, clear the currentIndex before searching - this way, focus will
stick on the search field until the user presses Down arrow to
intentionally interact with the results. Maintaing the currentItem on
search does not seem necessary; if the user already has selected the
item they want to interact with, they don't need to search for it
anymore, so if they're editing the search it's reasonable to assume they
don't care about whatever happened to be selected last.
FIXED-IN: 6.6.1


(cherry picked from commit f2e84488ed5050156f94bf948541d0258a733b1e)

Co-authored-by: Christoph Wolk <cwo.kde@posteo.net>

M  +6    -1    applets/systemtray/qml/ConfigGeneral.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/91264355a6eeb239a7fd759be60a75f18717af5d