File chooser loses focus after cancelling overwrite
Steps to reproduce
-
Create a file chooser dialog.
-
Open the dialog in "save as" mode.
-
Select an existing file.
-
Press
Enter
to confirm, which prompts to confirm overwriting. -
Press
Esc
or click Cancel to cancel overwriting. -
Select a different file using the keyboard.
Current behavior
File chooser dialog loses focus, keyboard interaction not possible.
Expected outcome
File chooser retains focus, keyboard interaction works.
Version information
GTK 3 via JavaFX 18 via Java 18 on Arch Linux. Note that GTK 3 has a fall back to GTK 2
Linux 5.18.10-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 07 Jul 2022 17:18:13 +0000 x86_64 GNU/Linux
$ pkg-config --modversion gtk+-3.0
3.24.34
Additional details
When the prompt to confirm overwriting appears, the file chooser loses focus (as expected) so that the user may Cancel/Confirm overwriting. When the prompt to confirm goes away due to a cancellation, we'd expect the file chooser to regain focus. Further, if the user confirms/accepts overwriting, then both dialogs disappear as expected.