From 86893afaea8b67c54665db6f49b0292fc0f5504f Mon Sep 17 00:00:00 2001 From: Kam Date: Fri, 8 May 2026 00:55:10 +0300 Subject: [PATCH] fix(docs-infra): keep mobile nav open when closing the search dialog Backdrop clicks on the search dialog were also closing the open mobile nav drawers. Adds an id to `` and references it from both navs' `docsClickOutsideIgnore` arrays. --- .../components/search-dialog/search-dialog.component.html | 2 +- adev/src/app/core/constants/element-ids.ts | 1 + adev/src/app/core/layout/navigation/navigation.component.html | 2 +- adev/src/app/core/layout/navigation/navigation.component.ts | 3 ++- .../secondary-navigation/secondary-navigation.component.html | 2 +- .../secondary-navigation/secondary-navigation.component.ts | 3 ++- 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/adev/shared-docs/components/search-dialog/search-dialog.component.html b/adev/shared-docs/components/search-dialog/search-dialog.component.html index b9ff5129ed3f..731daa5c6f08 100644 --- a/adev/shared-docs/components/search-dialog/search-dialog.component.html +++ b/adev/shared-docs/components/search-dialog/search-dialog.component.html @@ -1,4 +1,4 @@ - +
diff --git a/adev/src/app/core/layout/navigation/navigation.component.ts b/adev/src/app/core/layout/navigation/navigation.component.ts index e5e3bd2dffaa..ba80340e6424 100644 --- a/adev/src/app/core/layout/navigation/navigation.component.ts +++ b/adev/src/app/core/layout/navigation/navigation.component.ts @@ -22,7 +22,7 @@ import { import {NavigationEnd, Router, RouterLink} from '@angular/router'; import {filter, map, startWith} from 'rxjs/operators'; import {DOCS_ROUTES, REFERENCE_ROUTES, TUTORIALS_ROUTES} from '../../../routing/routes'; -import {PRIMARY_NAV_ID, SECONDARY_NAV_ID} from '../../constants/element-ids'; +import {PRIMARY_NAV_ID, SEARCH_DIALOG_ID, SECONDARY_NAV_ID} from '../../constants/element-ids'; import {COMMAND, CONTROL, SEARCH_TRIGGER_KEY} from '../../constants/keys'; import {ANGULAR_LINKS} from '../../constants/links'; import {PAGE_PREFIX} from '../../constants/pages'; @@ -52,6 +52,7 @@ export class Navigation { protected ngLinks = ANGULAR_LINKS; protected readonly PRIMARY_NAV_ID = PRIMARY_NAV_ID; protected readonly SECONDARY_NAV_ID = SECONDARY_NAV_ID; + protected readonly SEARCH_DIALOG_ID = SEARCH_DIALOG_ID; // We can't use the ActivatedRouter queryParams as we're outside the router outlet protected readonly isUwu = 'location' in globalThis ? location.search.includes('uwu') : false; diff --git a/adev/src/app/core/layout/secondary-navigation/secondary-navigation.component.html b/adev/src/app/core/layout/secondary-navigation/secondary-navigation.component.html index f287426deb5f..bb5203158c4a 100644 --- a/adev/src/app/core/layout/secondary-navigation/secondary-navigation.component.html +++ b/adev/src/app/core/layout/secondary-navigation/secondary-navigation.component.html @@ -3,7 +3,7 @@ class="adev-secondary-nav-mask" [class.docs-nav-secondary--open]="isSecondaryNavVisible()" (docsClickOutside)="close()" - [docsClickOutsideIgnore]="[PRIMARY_NAV_ID]" + [docsClickOutsideIgnore]="[PRIMARY_NAV_ID, SEARCH_DIALOG_ID]" >
= { [PAGE_PREFIX.REFERENCE]: getNavigationItemsTree(SUB_NAVIGATION_DATA.reference, (tree) =>