Skip to content
This repository has been archived by the owner on Jul 23, 2022. It is now read-only.

unsaved changes prompt not triggered when user does autoregeneration of a password field #761

Closed
JCDuclare opened this issue Mar 9, 2021 · 3 comments · Fixed by #851
Closed

Comments

@JCDuclare
Copy link

Normally, when the user tries to leave the edit process of e.g. a login object the desktop app will create a prompt with a warning for unsaved changes. This does not happen if the user triggers an autoregeneration of a password field and then leaves the object.

Steps To Reproduce

  1. Trigger the 'Generate Password' on a field while editing an item
  2. Switch to a different item

Expected Result

'Unsaved Changes' warning is triggered and the user has to confirm to leave and discard the changes

Actual Result

Changes are instantly lost and the user has been given no warning

Screenshots or Videos

h1wBiJMhOL

Environment

  • Windows 10 1909 18363.1379
  • Bitwarden Version 1.24.6
  • Shell 6.1.7
  • Renderer 76.0.3809.146
  • Node 12.4.0
  • Architecture x64
@gryffs
Copy link
Contributor

gryffs commented Apr 19, 2021

Thanks @JCDuclare for the opened issue, the video was handy. I can replicate this on my mac system as well. My first assumption is that there is an event that triggers when the view is actually edited but in this instance the generate password button does not cause that event to get triggered. I'll look into this issues.

@eliykat
Copy link
Member

eliykat commented Apr 19, 2021

@gryffs This would be a good candidate for a PR if you'd like to tackle it!

@gryffs
Copy link
Contributor

gryffs commented Apr 23, 2021

This issue is also mentioned here: #563

eliykat added a commit that referenced this issue May 2, 2021
Implement the markAsDirty form controls for AddEditComponent(#761)

Prevents add-edit page from closing if new password has been generated
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants