Skip to content

Commit

Permalink
Fix - Disable leave changes popup in settings sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
iamprazol committed Sep 5, 2024
1 parent 9407ed1 commit 645b1f3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions assets/js/admin/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,12 @@
skipBeforeUnloadPopup = true;
});

$(form)
.find(".ur-nav__link")
.on("click", function () {
skipBeforeUnloadPopup = true;
});

$(window).on("beforeunload", function (event) {
if (formChanged && !skipBeforeUnloadPopup) {
event.preventDefault();
Expand Down

0 comments on commit 645b1f3

Please sign in to comment.