HomePhabricator
Diffusion Comm a4656e7417fb

[web] Prevent user from closing the tab with unsaved edits

Description

[web] Prevent user from closing the tab with unsaved edits

Summary: Display confirmation alert when the user leaves the page with unsaved edit.

Test Plan:

  • Entered edit mode,
  • Closed tab without making any changes -> no alert,
  • Closed tab with some changes -> alert displayed,
  • Exited edit mode, checked if the alert is not displayed after closing the modal.

Screenshot:

Screenshot 2023-05-17 at 12.24.32.png (502×588 px, 52 KB)

Reviewers: michal, inka

Reviewed By: michal

Subscribers: ashoat, tomek, atul

Differential Revision: https://phab.comm.dev/D7849

Details

Provenance
kosmydel <kukubaczek@gmail.com>Authored on May 16 2023, 5:51 AM
Reviewer
michal
Differential Revision
D7849: [web] Prevent user from closing the tab with unsaved edits
Parents
rCOMM51a753adf418: [web] Added FocusTrap for modals
Branches
Unknown
Tags
Unknown