Fix warning for unsaved work on beforeUnload

Review Request #485 — Created March 17, 2017 and updated

guest822
Review Board
176916d...
demo
Previously, when editing a review or comments as a user without edit rights,
warning users about losing unsaved work did not get displayed.

Now the ReviewRequestEditorView's beforeUnload event handler does not check a
user's edit rights and only checks to see if any fields are being edited at the
moment.

New unit tests testing the onBeforeUnload event handler has been added.

Testing Done:
- Ran JS unit tests.
- Check that ReviewDialogView for both edit and non-edit privileged users are
  warned before unloading.

Bugs closed: 4084

Reviewed at https://reviews.reviewboard.org/r/8635/


  • 5
  • 0
  • 3
  • 0
  • 8
Description From Last Updated
444 guest7326 guest7326
asdf guest7622 guest7622
expand guest2546 guest2546
// is code rendered? if ((this.model.get('editable)) { return msg; } header guest7668 guest7668
how about message guest2546 guest2546
Loading...