116404: Prevent the opening from the modal using mouse interactions from automatically focussing on the first element

(cherry picked from commit 82ed3aadff)
This commit is contained in:
Alexandre Vryghem
2025-01-28 00:11:50 +01:00
committed by github-actions[bot]
parent a984957af9
commit 7de6aa0e24
3 changed files with 154 additions and 9 deletions

View File

@@ -72,9 +72,11 @@ export class MenuSectionComponent implements OnInit, OnDestroy {
* Set initial values for instance variables
*/
ngOnInit(): void {
this.menuService.isSectionActive(this.menuID, this.section.id).pipe(distinctUntilChanged()).subscribe((isActive: boolean) => {
this.active$.next(isActive);
});
this.subs.push(this.menuService.isSectionActive(this.menuID, this.section.id).pipe(distinctUntilChanged()).subscribe((isActive: boolean) => {
if (this.active$.value !== isActive) {
this.active$.next(isActive);
}
}));
this.initializeInjectorData();
}