Prompt to replace existing file overwrites different file if file chooser clicked too fast
Submitted by icasdri
On the prompt to replace/overwrite the existing file, a user might click 'Replace', and as the prompt is closing, click on another file in the file chooser as the dialog is closing. This causes an overwrite of the accidentally clicked file without additional confirmation. This is especially a problem if one has a twitchy mouse, or just accidently clicks behind or double clicks the 'Replace' button.
Steps to reproduce:
- Create a folder called 'test' somewhere.
- Inside 'test', create (e.g. touch) some number of files (enough so that the file chooser dialog would be filled). We'll call these files 'a', 'b', 'c', all the way to 'z'. (it may not need to be this many, just enough to be easy to quickly click on in step 6)
- Open a PDF in Evince, select 'Save a Copy' from the menu.
- In the file chooser dialog, select 'a'.
- Click 'Save' and observe that the prompt confirming to replace 'a' is shown.
- Click 'Replace' AND THEN immediately, as the dialog is closing, click on another file in the file chooser (probably most likely the one below where the 'Replace' button was), say 'k'
- Observe that file chooser dialog closes without any further confirmation.
- Close Evince.
- Observe that inside the directory 'test', 'k' (NOT 'a) has now been replaced by the PDF EVEN THOUGH the confirmation prompt asked the user whether he/she wished to replace 'a'.
Expected behavior: Disallowed further clicking in the file chooser box, further changes in the file chooser box ignored, or reprompted for confirmation to replace 'k'.
Actual behavior: 'k' is replaced without any confirmation.
Some hopefully useful information: evince 3.22.1 gnome-shell 3.22.1 GTK 3.22.1 GLib 2.50.1