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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Fix event propagation for context menus
Benjamin Bädorf07241abf8ed1
diff --git a/frontend/src/app/shared/components/op-context-menu/handlers/op-context-menu-trigger.directive.ts b/frontend/src/app/shared/components/op-context-menu/handlers/op-context-menu-trigger.directive.tsindex fa63240858f..117b887854f 100644--- a/frontend/src/app/shared/components/op-context-menu/handlers/op-context-menu-trigger.directive.ts+++ b/frontend/src/app/shared/components/op-context-menu/handlers/op-context-menu-trigger.directive.ts@@ -11,8 +11,10 @@ export class OpContextMenuTrigger extends OpContextMenuHandler implements AfterVprotected items:OpContextMenuItem[] = [];- constructor(readonly elementRef:ElementRef,- readonly opContextMenu:OPContextMenuService) {+ constructor(+ readonly elementRef:ElementRef,+ readonly opContextMenu:OPContextMenuService,+ ) {super(opContextMenu);}@@ -22,16 +24,13 @@ export class OpContextMenuTrigger extends OpContextMenuHandler implements AfterV// Open by clicking the elementthis.$element.on('click', (evt:JQuery.TriggeredEvent) => {evt.preventDefault();- evt.stopPropagation();// When clicking the same trigger twice, close the element instead.if (this.opContextMenu.isActive(this)) {this.opContextMenu.close();- return false;+ } else {+ this.open(evt);}-- this.open(evt);- return false;});// Open with keyboard combination as well