Bug 506505

Summary: The search widget traps the keyboard cursor when the search field is focused
Product: [Plasma] plasmashell Reporter: Arkadiusz Ryszard Świętnicki <nuno69a>
Component: Search widgetAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: alexander.lohnau, kde, nate, notmart
Priority: NOR Keywords: accessibility, usability
Version First Reported In: 6.4.1   
Target Milestone: 1.0   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.6.0
Sentry Crash Report:

Description Arkadiusz Ryszard Świętnicki 2025-07-02 21:20:24 UTC
SUMMARY
Entering the Search widget with the TAB key results in keyboard cursor trapping

STEPS TO REPRODUCE
1. Add a "Search" widget to your desktop, together with another widget, such as "Clipboard history".
2. Enter your desktop (Press META+D)
3. Use the TABV key to navigate the widgets.

OBSERVED RESULT
Entering the search widget field makes it impossible to exit it to get to another widget - the Tab key does not work

EXPECTED RESULT
The tab key should get out of the widget's search field and navigate to other elements on desktop

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 43
KDE Plasma Version: 6.4.1
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.1
Kernel Version: 6.16.0-0.rc3.250627g67a993863163.35.fc43.aarch64 (64-bit)
Graphics Platform: Wayland
Processors: 8
Memory: 8 GiB of RAM (7.7 GiB usable)
Graphics Processor: llvmpipe
Manufacturer: Parallels International GmbH.
Product Name: Parallels ARM Virtual Machine
System Version: 0.1

ADDITIONAL INFORMATION
I am using the Orca screenreader
Comment 1 Marco Martin 2025-07-23 08:10:26 UTC
I can reproduce, but only when there are results, the culript seems the result view that newver wants to lose focus
Comment 2 Marco Martin 2025-07-23 08:31:39 UTC
hmm, actually scratch that, focus does come out of the result view and i can get the clipboard history search field focused with just tab.

tab order of the various things is a bit questionable perhaps, but doesn't get stuck, neither with tab nor backtab
Comment 3 Marco Martin 2025-07-23 08:33:35 UTC
perhaps something interacting in Parallels?
Comment 4 Nate Graham 2025-07-23 14:17:42 UTC
The issue happens when focus is in the search field; in there, Tab doesn't move elsewhere. If focus is on a search result, it works.

However I'm downgrading the priority since there's an easy workaround and these widgets aren't on the desktop by default.
Comment 5 Bug Janitor Service 2026-02-03 11:51:29 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/milou/-/merge_requests/101
Comment 6 cwo 2026-02-05 15:00:42 UTC
Git commit f4ec61ecb8b97726192c979a2faaecdeff31a427 by Christoph Wolk.
Committed on 05/02/2026 at 14:50.
Pushed by cwo into branch 'master'.

plasmoid: make tab focus work as desktop widget

When the Search widget is used on the desktop, pressing tab does not
move focus properly if there are no search results. The problem is that
tab still tries to give focus to the ResultsView, which has custom Tab
key handling that end up swallowing the event in this case. We can avoid
this by removing the ResultsView from the tab chain if empty, but this
is not a full fix - the forwarding key events from the search field to
the ResultsView that is still active now causes Backtab to be stuck
instead.

So we remove it from the tab chain and also disable the key forwarding
if there are no search results. We also move the forwarding itself from
the SearchField component to the plasmoid, as that reduces coupling and
makes the linter happy.
FIXED-IN: 6.6.0

M  +0    -1    plasmoid/SearchField.qml
M  +2    -0    plasmoid/main.qml

https://invent.kde.org/plasma/milou/-/commit/f4ec61ecb8b97726192c979a2faaecdeff31a427
Comment 7 cwo 2026-02-05 15:11:46 UTC
Git commit a364b156943c7fe2cb2327bd835b5af9208b01ad by Christoph Wolk.
Committed on 05/02/2026 at 15:01.
Pushed by cwo into branch 'Plasma/6.6'.

plasmoid: make tab focus work as desktop widget

When the Search widget is used on the desktop, pressing tab does not
move focus properly if there are no search results. The problem is that
tab still tries to give focus to the ResultsView, which has custom Tab
key handling that end up swallowing the event in this case. We can avoid
this by removing the ResultsView from the tab chain if empty, but this
is not a full fix - the forwarding key events from the search field to
the ResultsView that is still active now causes Backtab to be stuck
instead.

So we remove it from the tab chain and also disable the key forwarding
if there are no search results. We also move the forwarding itself from
the SearchField component to the plasmoid, as that reduces coupling and
makes the linter happy.
FIXED-IN: 6.6.0


(cherry picked from commit f4ec61ecb8b97726192c979a2faaecdeff31a427)

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

M  +0    -1    plasmoid/SearchField.qml
M  +2    -0    plasmoid/main.qml

https://invent.kde.org/plasma/milou/-/commit/a364b156943c7fe2cb2327bd835b5af9208b01ad