Skip to content

Commit

Permalink
Merge pull request #652 from usdoj/develop
Browse files Browse the repository at this point in the history
Confirm leave patch into uat
  • Loading branch information
brockfanning authored Sep 10, 2024
2 parents 5a86ad2 + 63d11c7 commit c104948
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@
},
"drupal/lightning_media": {
"Issue 3456919 - Fixes error in github action test Drupal 10.3": "https://www.drupal.org/files/issues/2024-07-12/mapping-definition-entity-browser-upload-validators-3456919.patch"
},
"drupal/autologout": {
"Avoid problematic interactions with the confirm_leave module": "./patches/autologout-support-for-confirm_leave.patch"
}
},
"installer-types": [
Expand Down
8 changes: 6 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions patches/autologout-support-for-confirm_leave.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/js/autologout.js b/js/autologout.js
index ca3fe7e..8c0a4a9 100644
--- a/js/autologout.js
+++ b/js/autologout.js
@@ -196,6 +196,8 @@
}

function logout() {
+ // Prevent the confirm_leave module from interfering.
+ window.onbeforeunload = function () {};
if (localSettings.use_alt_logout_method) {
let logoutUrl = drupalSettings.path.baseUrl + "autologout_alt_logout";
triggerLogoutEvent('alternative', logoutUrl);

0 comments on commit c104948

Please sign in to comment.