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

Stop event propagation on mobile to avoid a quick open and direct close of the search. That is fine, as on mobile no other modal could wait for this event as the modals span full height.

Henriette Darge57dd4a89e6ff
diff --git a/frontend/src/app/core/global_search/input/global-search-input.component.ts b/frontend/src/app/core/global_search/input/global-search-input.component.ts
index b9949d466bd..3eea0c6ab20 100644
--- a/frontend/src/app/core/global_search/input/global-search-input.component.ts
+++ b/frontend/src/app/core/global_search/input/global-search-input.component.ts
@@ -172,6 +172,9 @@ export class GlobalSearchInputComponent implements AfterViewInit, OnDestroy {
this.toggleMobileSearch();
// open ng-select menu on default
jQuery('.ng-input input').focus();
+ // only for mobile and not for all devices!
+ // See https://github.com/opf/openproject/commit/a2eb0cd6025f2ecaca00f4ed81c4eb8e9399bd86
+ event.stopPropagation();
} else if (this.searchTerm?.length === 0) {
this.ngSelectComponent.ngSelectInstance.focus();
} else {