Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Remove dontCloseWhenUsing

Oliver Günther2794e610ffbe
diff --git a/frontend/src/app/core/setup/globals/global-listeners/action-menu.ts b/frontend/src/app/core/setup/globals/global-listeners/action-menu.ts
index 7be287896a3..e92dfd38894 100644
--- a/frontend/src/app/core/setup/globals/global-listeners/action-menu.ts
+++ b/frontend/src/app/core/setup/globals/global-listeners/action-menu.ts
@@ -25,8 +25,8 @@
//
// See COPYRIGHT and LICENSE files for more details.
//++
-import ClickEvent = JQuery.ClickEvent;
import { ANIMATION_RATE_MS } from 'core-app/core/top-menu/top-menu.service';
+import ClickEvent = JQuery.ClickEvent;
/*
The action menu is a menu that usually belongs to an OpenProject entity (like an Issue, WikiPage, Meeting, ..).
diff --git a/frontend/src/app/core/top-menu/top-menu.service.ts b/frontend/src/app/core/top-menu/top-menu.service.ts
index ad4b9c555f3..a967595ec98 100644
--- a/frontend/src/app/core/top-menu/top-menu.service.ts
+++ b/frontend/src/app/core/top-menu/top-menu.service.ts
@@ -168,7 +168,6 @@ export class TopMenuService {
}
private openDropdown(dropdown:HTMLElement):void {
- this.dontCloseWhenUsing(dropdown);
this.closeOtherItems(dropdown);
this.slideAndFocus(dropdown, () => {
this.active$.next(dropdown);
@@ -190,24 +189,6 @@ export class TopMenuService {
});
}
- private dontCloseWhenUsing(dropdown:HTMLElement):void {
- setTimeout(() => {
-
- jQuery(dropdown).find('li').click((event) => {
- event.stopPropagation();
- });
-
- jQuery(dropdown).bind('mousedown mouseup click', (event) => {
- event.stopPropagation();
- });
- }, 0);
- }
-
- private removeStoppingOfEventPropagation(dropdown:HTMLElement):void {
- jQuery(dropdown).find('li').unbind('click');
- jQuery(dropdown).unbind('mousedown mouseup click');
- }
-
private slideAndFocus(dropdown:HTMLElement, callback:() => void):void {
this.slideDown(dropdown, callback);
setTimeout(() => this.focusFirstInputOrLink(dropdown), ANIMATION_RATE_MS);