In wayland using chrome or firefox, the xdg file open dialog and save-as (using xdg-portal) is broken when operated by keyboard Setup: Use the env.Var GTK_USE_PORTAL=1 and start firefox or chromium-freeworld, then try to open a file with Ctrl-O. The open-file Portal dialog comes up. Problem - start directly by using the up/down cursor keys to navigate inside the file list-panel (don't use the mouse/don't click) - the current selection is not highlighted / does not move (depending on how often you pressed up/down, sometimes you see a flicker/highlight of a single file.) - in the 'name' field, you see the current selection because the contents change according to the (invisible) selection - the preview-pane shows the content-preview correctly of the selected file (txt or pdf for example) This happens for file-open and for save-as dialogs. As a user i expect the file-list panel to be the active one and using the keyboard to allow me to select files/folders
Operating System: Fedora Linux 37 KDE Plasma Version: 5.27.0 KDE Frameworks Version: 5.103.0 Qt Version: 5.15.8 Kernel Version: 6.1.12-200.fc37.x86_64 (64-bit) Graphics Platform: Wayland Processors: 8 × Intel® Core™ i7-7820HQ CPU @ 2.90GHz Memory: 31,1 GiB of RAM Graphics Processor: Mesa Intel® HD Graphics 630
This isn't a bug in the XDG dialog; it's actually the behavior of all KDE open/save dialogs, even for apps not using XDG portals. The issue is that focus is placed on the file name field by default rather than the file view. As a result, pressing the up and down keys cycles between items in the file name field (which is actually a combobox) rather than the file view. I agree with you that it's not ideal, and the user is probably more likely to want to move the selection between items in the file view than they are to want to switch between items in the combobox. There are two ways we could potentially fix this: 1. Put focus on the file view by default 2. Keep focus where it is but let the up and down arrow keys move the selection in the file view The downside for #1 would be that we break people's muscle memory if they were accustomed to typing a filename or path in the text field The downside for #2 would be that we break the feature of using the up and down arrows to select items in the combobox.
well, regarding the up/down arrow when the 'name' input has focus: The list-panel above differentiates between a selection (dark blue background) when clicking into it with the mouse and a 'selection-hint' with a light blue background when using the arrow-keys in the 'name' input field For me, this would be ok to leave as it is, if the light-blue selection marker would behave properly when using the arrow-keys in the 'name' input. Right now, it appears sometime, but most often it does not. So we have no visual feedback Regarding the initial focus: If we select the list-panel, then pressing letter keys should navigate to entries starting with the pressed letter So, starting typing (muscle memory) could take more than the first letter typed into account and select a filename starting with the letters typed in short succession (after a pause, the selection process would start over freshly. it was designed like this and still works like that - i checked) Then you have both: typing selects the file you want, you could still go to any other field with ALT+<shortcut_letter_of_field> and edit the selection (like: ALT-n for name field) or press ENTER to confirm your selection
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1860
Git commit ba6556f356ba4663a7f754212a6b0b17878581f4 by Akseli Lahtinen. Committed on 09/04/2025 at 13:50. Pushed by akselmo into branch 'master'. KFileWidget: Fix key navigation escaping in save dialogs In save dialogs the keyboard navigation would escape during file highlighting, since the fileHighlight sets the focus for fileName bar for mouse operations. This makes sure the user has to press Tab to explicitly escape the keyboard navigation mode. For clicking the items, it should not affect at all. FIXED-IN: 6.14 M +17 -1 src/filewidgets/kdiroperator.cpp M +1 -1 src/filewidgets/kdiroperator.h M +5 -9 src/filewidgets/kfilewidget.cpp https://invent.kde.org/frameworks/kio/-/commit/ba6556f356ba4663a7f754212a6b0b17878581f4
The above fix was reverted due to API breakage
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1878
Git commit 8e4e84f045b7459c0b02b1b1b51a9df73cea068a by Akseli Lahtinen. Committed on 07/05/2025 at 13:35. Pushed by akselmo into branch 'master'. KFileWidget: Fix key navigation escaping in save dialogs In save dialogs the keyboard navigation would escape during file highlighting, since the fileHighlight sets the focus for fileName bar for mouse operations. This makes sure the user has to press Tab to explicitly escape the keyboard navigation mode. For clicking the items, it should not affect at all. FIXED-IN: 6.14 M +21 -0 src/filewidgets/kdiroperator.cpp M +7 -0 src/filewidgets/kdiroperator.h M +4 -4 src/filewidgets/kfilewidget.cpp https://invent.kde.org/frameworks/kio/-/commit/8e4e84f045b7459c0b02b1b1b51a9df73cea068a
Git commit 719e0b0031155ef83a2cf71d6d24114dea181353 by Nicolas Fella, on behalf of Akseli Lahtinen. Committed on 09/05/2025 at 20:48. Pushed by nicolasfella into branch 'Frameworks/6.14'. KFileWidget: Fix key navigation escaping in save dialogs In save dialogs the keyboard navigation would escape during file highlighting, since the fileHighlight sets the focus for fileName bar for mouse operations. This makes sure the user has to press Tab to explicitly escape the keyboard navigation mode. For clicking the items, it should not affect at all. FIXED-IN: 6.14 (cherry picked from commit 8e4e84f045b7459c0b02b1b1b51a9df73cea068a) M +21 -0 src/filewidgets/kdiroperator.cpp M +7 -0 src/filewidgets/kdiroperator.h M +4 -4 src/filewidgets/kfilewidget.cpp https://invent.kde.org/frameworks/kio/-/commit/719e0b0031155ef83a2cf71d6d24114dea181353