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 registerEventHandlers

Oliver Günther4cc7f03fd719
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 9342162c702..ad4b9c555f3 100644
--- a/frontend/src/app/core/top-menu/top-menu.service.ts
+++ b/frontend/src/app/core/top-menu/top-menu.service.ts
@@ -53,7 +53,6 @@ export class TopMenuService {
register():void {
this.setupDropdownClick();
- this.registerEventHandlers();
this.closeOnBodyClick();
this.accessibility();
this.skipContentClickListener();
@@ -254,27 +253,6 @@ export class TopMenuService {
}, 10);
}
- private registerEventHandlers():void {
- this.menuContainer.addEventListener('closeDropdown', (event:CustomEvent) => {
- this.closeDropdown(event.target as HTMLElement);
- });
-
- this.menuContainer.addEventListener('openDropDown', (event:CustomEvent) => {
- this.openDropdown(event.target as HTMLElement);
- });
-
- this.menuContainer.addEventListener('openMenu', () => {
- const first = Array.from(this.dropdowns())[0];
-
- if (first) {
- this.openDropdown(first);
- this.opening();
- }
- });
-
- this.menuContainer.addEventListener('closeMenu', () => this.close());
- }
-
private getDropdownContainer(dropdown:HTMLElement):HTMLElement {
return dropdown.querySelector('.op-app-menu--dropdown') as HTMLElement;
}