diff options
Diffstat (limited to 'resources/assets/javascripts/bootstrap/actionmenu.js')
| -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 |
