Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete key passes through to database widget despite active modal dialog #11217

Open
dandan2244 opened this issue Aug 31, 2024 · 2 comments
Open

Comments

@dandan2244
Copy link

Overview

KeePassXC 2.7.9 Mac with external Logitech Keyboard. You want to use "Save as" to save the database. In the Save As window, you left-click once and then use the Delete key on the external keyboard to delete a character. If you press the Delete key on the keyboard, this character will not be deleted. Instead, your database entry will be accidentally deleted in the background.

Steps to Reproduce

  1. You select an entry e.g. test1 that contains username and password inside
  2. Database -> Database save as
  3. The Database save as window opens
  4. Inside of the „Save as:“ you left click once that the cursor appears
  5. On the external keyboard you press the DEL key
  6. Instead of deleting the character in the “Save as:” field, the selected entry test1 is deleted from the database.

Expected Behavior

The character in the "Save as:" field is deleted

Actual Behavior

The selected entry in the background window will be deleted

Context

This only happens when I use an external keyboard. But I think I'm not the only one who uses an external keyboard, and accidentally deleting an entry in the background window is a critical behavior with unintended data loss.

It would be nice if there was a setting that required confirmation before deleting entries. This can prevent accidental deletion.

KeePassXC - 2.7.9
Revision: REVISION

Operating System: macOS

@dandan2244 dandan2244 added the bug label Aug 31, 2024
@droidmonkey
Copy link
Member

droidmonkey commented Aug 31, 2024

There are settings that require confirmation before deleting. The default behavior is to send entries to he database recycle bin.

However, this doesn't make sense. The save as dialog is a modal dialog that captures all keyboard input and won't send any to the application. I also do not understand the difference an external keyboard would make.

@droidmonkey
Copy link
Member

droidmonkey commented Aug 31, 2024

Despite my initial thoughts above, this is actually a bug. However I think this is a Qt bug in that focus is not properly delivered to the save as dialog. We can prevent this specific behavior from happening by ignoring delete actions when a modal dialog is active.

@droidmonkey droidmonkey changed the title Database entries are deleted unintentionally Delete key passes through to database widget despite active modal dialog Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants