diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2026-03-17 14:32:36 +0100 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2026-03-17 14:32:41 +0100 |
| commit | 9c173e5660f623cf19fd5514452f9a3722128701 (patch) | |
| tree | 10877344f36b65a932325f25d1dd43ad584daca0 /resources/assets/javascripts/bootstrap | |
| parent | ee91143bc05333323b44b5a41c6592894d0811f9 (diff) | |
fix opening of action menu and position of icon when reversed, fixes #6373biest-6373
Diffstat (limited to 'resources/assets/javascripts/bootstrap')
| -rw-r--r-- | resources/assets/javascripts/bootstrap/actionmenu.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/resources/assets/javascripts/bootstrap/actionmenu.js b/resources/assets/javascripts/bootstrap/actionmenu.js index 0baff56..f39ffb2 100644 --- a/resources/assets/javascripts/bootstrap/actionmenu.js +++ b/resources/assets/javascripts/bootstrap/actionmenu.js @@ -4,7 +4,11 @@ var last = null; // Open action menu on click on the icon - $(document).on('click', '.action-menu-icon', function () { + $(document).on('click', '.action-menu-icon', function (event) { + // Stop event so the following close event will not be fired + event.stopImmediatePropagation(); + event.preventDefault(); + // Choose correct root element if menu was positioned absolutely let root_element = $(this).closest('.action-menu'); if ($(this).closest('.action-menu-wrapper').length > 0) { @@ -23,9 +27,6 @@ } STUDIP.ActionMenu.create(root_element, position).toggle(); - - // Stop event so the following close event will not be fired - return false; }); // Close action menu on click outside |
