File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,8 @@ import { I18n } from "./../../i18n/i18n.module";
1919 #dialog
2020 class="bx--overflow-menu-options bx--overflow-menu-options--open"
2121 role="menu"
22- (focusout)="clickClose($event)"
22+ (focusout)="menuClose($event)"
23+ (click)="doClose()"
2324 [attr.aria-label]="dialogConfig.menuLabel">
2425 <ng-template
2526 [ngTemplateOutlet]="dialogConfig.content"
@@ -110,14 +111,10 @@ export class OverflowMenuPane extends Dialog {
110111 }
111112 }
112113
113- clickClose ( event ) {
114- // Opens menu when clicking on the menu button and stays open while navigating through the options
115- if ( this . dialogConfig . parentRef . nativeElement . firstChild . contains ( event . target ) ||
116- this . listItems ( ) . some ( button => button === event . relatedTarget ) ||
117- event . type === "focusout" && event . relatedTarget === this . dialogConfig . parentRef . nativeElement ) {
118- return ;
114+ menuClose ( event ) {
115+ if ( this . listItems ( ) . some ( button => button === document . activeElement ) ) {
116+ this . doClose ( ) ;
119117 }
120- this . doClose ( ) ;
121118 }
122119
123120 protected listItems ( ) {
You can’t perform that action at this time.
0 commit comments