[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:
Reviewers: michal, inka
Reviewed By: michal
Subscribers: ashoat, tomek, atul
Differential Revision: https://phab.comm.dev/D7849