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

Unsaved changes are thrown away when choosen not to #10778

Open
OakLD opened this issue May 19, 2024 · 8 comments
Open

Unsaved changes are thrown away when choosen not to #10778

OakLD opened this issue May 19, 2024 · 8 comments

Comments

@OakLD
Copy link

OakLD commented May 19, 2024

Overview

Unsaved changes are thrown away

Steps to Reproduce

  1. Create new entry or make changes in KeepasXC
  2. Lock the screen
  3. Unlock the screen and get focus back on KeepasXC window
  4. A message appears stating (translated from Czech): Item is being modified. Close despite that and throw away changes? Two options are given "Throw away" and "Cancel". Selecting any of them results in KeepasXC getting locked and changes are lost.

Expected Behavior

When hitting "Cancel" [Action], the process described in the dialog - throwing away data - should be cancelled. When clicking on "Throw away", changes should be thrown away.

Actual Behavior

Data are lost thrown away with either "Throw away" and "Cancel" option.

Context

KeePassXC - KeepasXC 2.7.8
Revision: f6757d3

Operating System: Linux
Desktop Env: KDE
Windowing System: Wayland

@OakLD OakLD added the bug label May 19, 2024
@droidmonkey
Copy link
Member

I cannot replicate this at all

@OakLD
Copy link
Author

OakLD commented May 26, 2024

I can easily replicate it. I wasn't able to do it with a simple lock now, but putting a session to sleep and waking it back resulted in exactly this behavior. I'm quite sure it happens from lock as well, since it happens on my desktop as well, where I don't use sleep mode. I'v lost data at least 10 times on 2 different machine (over years). I know about the bug for a long time, but sometimes forget to save changes in the middle of things...

@droidmonkey
Copy link
Member

Locking is locking, doesn't matter what triggers it, it's all calling the same code.

@OakLD
Copy link
Author

OakLD commented May 26, 2024

Perhaps, but I've just reproduced that on 2nd computer the same way - putting it to sleep and waking up.

@OakLD
Copy link
Author

OakLD commented May 26, 2024

And on the 3rd computer, also a desktop PC with OpenSuSE Leap 15.5. So 100% success when putting/letting computers to sleep. On "Cancel" the app locks and wants password and looses data.

@droidmonkey
Copy link
Member

I'll try it again

@droidmonkey
Copy link
Member

I still cannot replicate this after going to sleep. When I click cancel upon resume from sleep the database does not lock (expected). If I click Discard then the database attempts to lock but will prompt to save if there are unsaved changes (expected). I am testing this on Windows, but there is absolutely no difference in the code for this behavior between Windows and Linux.

@OakLD
Copy link
Author

OakLD commented May 27, 2024

I wish I could further help with your effort, but that's about all I observed so far. The only thing is, that with putting it to sleep, I noticed the "Throw Away" + "Cancel" dialog comes before the computer locks and then when woke up, it's still visible, but in a second is replaced with login dialog (and the changes are lost).

@droidmonkey droidmonkey reopened this May 27, 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