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

New entry is lost when canceling and then saving #3141

Closed
jf4923 opened this issue May 12, 2019 · 3 comments
Closed

New entry is lost when canceling and then saving #3141

jf4923 opened this issue May 12, 2019 · 3 comments
Assignees
Milestone

Comments

@jf4923
Copy link

jf4923 commented May 12, 2019

Expected Behavior

After creating a new entry and adding data you can press the escape key or cancel button to trigger the 'Entry has unsaved changes' dialog. Clicking 'Save' should close the dialog and add a new item to the tree.

Current Behavior

Clicking 'Save' does the same thing as 'Discard' - it closes the new entry and drops the new data.

The entered data are lost!

Possible Solution

Not pressing 'Save'! Pressing 'Cancel' lets you at least return to the new entry and continue.

This seems related to the closed issue #1133 (apply key was removed as solution apparently...). Maybe you should remove the 'Save' button as well if you can't fix this.

Steps to Reproduce

  1. Click 'Add a new entry'
  2. Enter at least one character as title
  3. Hit 'Escape' key or click 'Cancel' at the bottom right
  4. Click 'Save' on the dialog
  5. Look for the new entry - it's not there

Context

I wanted to save without using the mouse and thought that 'Escape' is a nice trigger.

Debug Info

KeePassXC - Version 2.4.1
Revision: 7bafe65

Qt 5.9.5
Debugging mode is disabled.

Operating system: Ubuntu 18.04.2 LTS
CPU architecture: x86_64
Kernel: linux 4.15.0-48-generic

Enabled extensions:

  • Auto-Type
  • Browser Integration
  • SSH Agent
  • KeeShare (only unsigned sharing)
  • YubiKey

Cryptographic libraries:
libgcrypt 1.8.1

@jf4923 jf4923 added the bug label May 12, 2019
@droidmonkey
Copy link
Member

I thought I fixed this problem. Sorry for the data loss. For future reference, pressing Ctrl+Enter is the same as pressing OK.

@droidmonkey droidmonkey self-assigned this May 16, 2019
@droidmonkey droidmonkey added this to the v2.4.2 milestone May 16, 2019
@droidmonkey
Copy link
Member

confirmed this is a big problem

droidmonkey added a commit that referenced this issue May 31, 2019
* Fixes #3141
* Clearing the entry edit widget prior to emitting the editFinished signal caused the widget to be marked modified and prevent new entries from being created. Use an explicit boolean to notify commit success.
* Don't clear password generator on canceling a cancel
* Don't discard changes if saving from a cancel produces an error
droidmonkey added a commit that referenced this issue May 31, 2019
* Fixes #3141
* Clearing the entry edit widget prior to emitting the editFinished signal caused the widget to be marked modified and prevent new entries from being created. Use an explicit boolean to notify commit success.
* Don't clear password generator on canceling a cancel
* Don't discard changes if saving from a cancel produces an error
droidmonkey added a commit that referenced this issue May 31, 2019
* Fixes #3141
* Clearing the entry edit widget prior to emitting the editFinished signal caused the widget to be marked modified and prevent new entries from being created. Use an explicit boolean to notify commit success.
* Don't clear password generator on canceling a cancel
* Don't discard changes if saving from a cancel produces an error
@jf4923
Copy link
Author

jf4923 commented Jul 4, 2019

Thanks, works! :)

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