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.

pull/10641/head
Henriette Darge 3 years ago
parent 84cfd5abb7
commit 57dd4a89e6
  1. 3
      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 {

Loading…
Cancel
Save