Bug 508850

Summary: Open With dialog should pre-select something in the view after searching
Product: [Plasma] xdg-desktop-portal-kde Reporter: Christoph Feck <cfeck>
Component: generalAssignee: Nate Graham <nate>
Status: ASSIGNED ---    
Severity: normal CC: aleixpol, kdelibs-bugs-null, nate
Priority: NOR Keywords: accessibility, usability
Version First Reported In: 6.4.80   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Christoph Feck 2025-08-28 13:10:14 UTC
Steps to reproduce:
- select any non-text file (e.g. executable) in Dolphin
- context menu > Open With > Other Application ...
- a "Choose Application" dialog appears, with a line edit focussed
- type "kwrite" into the line edit
- try to confirm/activate the dialog with the keyboard (e.g. just by hitting Enter, or "OK/Cancel" buttons that you can Tab to, or Cursor+Enter navigation in the icon view)

Expected result:
- it should be possible to confirm the dialog without a mouse 

Actual result:
- impossible
Comment 1 Nate Graham 2025-08-28 16:22:20 UTC
The problem in your steps is that KWrite isn't automatically selected in the view; you have to to that yourself with the down arrow key or tab key. If we auto-focused stuff in the view, we'd have to remove focus from the search field, and that would be annoying because how would we know when you're finished typing?

We could give it *inactive* selection and keep the active focus in the search field, the way Kickoff does. This would speed up the common case where you search for something, narrow the view down to one item, and want to choose it immediately.
Comment 2 Christoph Feck 2025-08-28 17:58:31 UTC
Well, Tab didn't work (the icon view seems to be not in the chain), but Down did work. Merci!
Comment 3 Nate Graham 2025-09-17 20:31:33 UTC
I'm working on some improvements here.
Comment 4 Bug Janitor Service 2025-09-17 21:15:44 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/431