Skip to content

Commit

Permalink
fix(popover): close on tab (#907)
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] authored and GitHub Enterprise committed May 3, 2023
1 parent e2ac39d commit cab9391
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion projects/ng-aquila/src/popover/popover-trigger.directive.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ConfigurableFocusTrap, ConfigurableFocusTrapFactory, FocusMonitor } from '@angular/cdk/a11y';
import { Directionality } from '@angular/cdk/bidi';
import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';
import { ENTER, SPACE } from '@angular/cdk/keycodes';
import { ENTER, SPACE, TAB } from '@angular/cdk/keycodes';
import {
ConnectionPositionPair,
FlexibleConnectedPositionStrategy,
Expand Down Expand Up @@ -231,6 +231,11 @@ export class NxPopoverTriggerDirective implements AfterViewInit, OnDestroy, OnIn
case ENTER:
this.handleClick();
break;
case TAB:
if (this.trigger === 'hover') {
this.show = !this.isOpen;
}
break;
default:
}
});
Expand Down

0 comments on commit cab9391

Please sign in to comment.