aboutsummaryrefslogtreecommitdiff
path: root/resources/assets/javascripts/bootstrap/dialog.js
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+github@gmail.com>2024-07-08 15:50:03 +0200
committerJan-Hendrik Willms <tleilax+github@gmail.com>2024-07-08 16:24:10 +0200
commit58ec440501ee821931706fd12dbd9331b0eaca50 (patch)
tree26fbd06d9f3775b16a5f01b549b22a97a454258c /resources/assets/javascripts/bootstrap/dialog.js
parent471197f7abc27b0fdc65e453587a74906922f9d5 (diff)
convert oersearch to sfc, re #4302tic-4302
Diffstat (limited to 'resources/assets/javascripts/bootstrap/dialog.js')
-rw-r--r--resources/assets/javascripts/bootstrap/dialog.js15
1 files changed, 11 insertions, 4 deletions
diff --git a/resources/assets/javascripts/bootstrap/dialog.js b/resources/assets/javascripts/bootstrap/dialog.js
index 58d01fd..58857cb 100644
--- a/resources/assets/javascripts/bootstrap/dialog.js
+++ b/resources/assets/javascripts/bootstrap/dialog.js
@@ -2,7 +2,14 @@ STUDIP.domReady(function () {
STUDIP.Dialog.initialize();
});
-$(document).on('click', '[data-vue-app] [data-dialog-button] .cancel.button', () => {
- STUDIP.Dialog.close();
- return false;
-});
+document.addEventListener(
+ 'click',
+ (event) => {
+ if (event.target.matches('.studip-dialog [data-vue-app] [data-dialog-button] .cancel.button')) {
+ STUDIP.Dialog.close();
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ },
+ true
+);