1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 22:03:36 +00:00

[PM-7278] Fix undefined reference to keyManager within menu-trigger-for directive (#8614)

This commit is contained in:
Cesar Gonzalez
2024-04-04 09:57:10 -05:00
committed by GitHub
parent bf2f570b61
commit e2e593c0fe

View File

@@ -88,13 +88,13 @@ export class MenuTriggerForDirective implements OnDestroy {
} }
this.destroyMenu(); this.destroyMenu();
}); });
if (this.menu.keyManager) {
this.menu.keyManager.setFirstItemActive(); this.menu.keyManager.setFirstItemActive();
this.keyDownEventsSub = this.keyDownEventsSub = this.overlayRef
this.menu.keyManager &&
this.overlayRef
.keydownEvents() .keydownEvents()
.subscribe((event: KeyboardEvent) => this.menu.keyManager.onKeydown(event)); .subscribe((event: KeyboardEvent) => this.menu.keyManager.onKeydown(event));
} }
}
private destroyMenu() { private destroyMenu() {
if (this.overlayRef == null || !this.isOpen) { if (this.overlayRef == null || !this.isOpen) {