Bug 444515

Summary: If file already exists and the user clicks cancel, force the focus on the filename
Product: [Frameworks and Libraries] frameworks-kio Reporter: Antti Savolainen <antti.savo>
Component: Open/save dialogsAssignee: Oliver Beard <olib141>
Status: RESOLVED FIXED    
Severity: wishlist CC: kdelibs-bugs, nate, olib141
Priority: NOR Keywords: usability
Version: 5.90.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 5.107
Sentry Crash Report:

Description Antti Savolainen 2021-10-28 01:03:29 UTC
SUMMARY
Demonstrative video: https://youtu.be/kvAM-iy67QY
It would be a nice usability fix if the focus would go on the recommended filename when the user refuses to overwrite the file. This would allow the user to immediately start typing the new desired filename without fumbling for the mouse.

STEPS TO REPRODUCE
1. Enter the file save dialog
2. Have the file be something that is already in the folder
3. Try to save the file
4. In the "Overwrite file?" dialog click cancel

OBSERVED RESULT
The focus is still on the save button

EXPECTED RESULT
The filepicker should move focus on the filename and highligh it.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
(available in About System)
KDE Plasma Version: 5.23.2
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2
Comment 1 Bug Janitor Service 2023-06-10 08:49:18 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1309
Comment 2 Nate Graham 2023-06-12 18:55:34 UTC
Git commit cff4ec757e618478bdcb5f07a3e7ea6f5da9f3c6 by Nate Graham, on behalf of Oliver Beard.
Committed on 12/06/2023 at 18:31.
Pushed by ngraham into branch 'master'.

filewidgets/kfilewidget: Select and focus filename after canceling overwrite

This ensures that the filename can be typed immediately after pressing the save button and cancelling an overwrite.

M  +3    -0    src/filewidgets/kfilewidget.cpp

https://invent.kde.org/frameworks/kio/-/commit/cff4ec757e618478bdcb5f07a3e7ea6f5da9f3c6
Comment 3 Nate Graham 2023-06-12 20:40:49 UTC
Git commit aae2e2b47c239d03c84f7a8873baa2271af9da21 by Nate Graham, on behalf of Oliver Beard.
Committed on 12/06/2023 at 19:45.
Pushed by ngraham into branch 'kf5'.

filewidgets/kfilewidget: Select and focus filename after canceling overwrite

This ensures that the filename can be typed immediately after pressing the save button and cancelling an overwrite.


(cherry picked from commit cff4ec757e618478bdcb5f07a3e7ea6f5da9f3c6)

M  +3    -0    src/filewidgets/kfilewidget.cpp

https://invent.kde.org/frameworks/kio/-/commit/aae2e2b47c239d03c84f7a8873baa2271af9da21