keepassxc icon indicating copy to clipboard operation
keepassxc copied to clipboard

Prevent user from leaving unlock window by hitting ESC (#11199)

Open WinnetouL opened this issue 1 year ago • 3 comments

Fixes #11199 The issue is about to improve user experience. In case the user is about to unlock the database and hits the escape key while the password field is on focus, the unlock window would close. From the user point of view the window should not be closed at that point. With current changes the unlock window will not be closed anymore when hitting the escape key and instead a popup will open and asks if the user really wants to cancel the unlock process.

Open question: I think these changes reflect the initial discussed solution for this issue. The current process is the same when hitting the escape key or clicking on the "Close" button. In my opinion the workflow might be fine when hitting ESC, but I don't think a further popup after clicking on "Close" would be necessary. Should this be changed?

Anything else that should be changed?

Screenshots

screenshot_kp

Testing strategy

Are tests for this kind of contribution expected?

Type of change

  • ✅ Bug fix (non-breaking change that fixes an issue)

WinnetouL avatar Sep 01 '24 11:09 WinnetouL

  1. The question should not appear if the user clicks the close button
  2. The question text should use "close": Would you like to close this database?
  3. The question should NOT appear ever for the database unlock dialog

An alternative to the modal popup question is a warning message displayed: "Press ESC again to close this database"

droidmonkey avatar Sep 01 '24 13:09 droidmonkey

I got the first two points, @droidmonkey Can you further explain what is meant by your third point? Do you mean the position of the popup? thanks

WinnetouL avatar Sep 02 '24 16:09 WinnetouL

When DatabaseOpenDialog is used, do not ask if you want to close the database.

droidmonkey avatar Sep 02 '24 16:09 droidmonkey