File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import { I18n } from "./../../i18n/i18n.module";
1313 selector : "ibm-overflow-menu-pane" ,
1414 template : `
1515 <ul
16+ #dialog
1617 class="bx--overflow-menu-options bx--overflow-menu-options--open"
1718 role="menu"
1819 (focusout)="clickClose($event)"
@@ -50,7 +51,6 @@ export class OverflowMenuPane extends Dialog {
5051
5152 @HostListener ( "keydown" , [ "$event" ] )
5253 hostkeys ( event : KeyboardEvent ) {
53- this . escapeClose ( event ) ;
5454 const listItems = this . listItems ( ) ;
5555
5656 switch ( event . key ) {
@@ -86,13 +86,17 @@ export class OverflowMenuPane extends Dialog {
8686 listItems [ listItems . length - 1 ] . focus ( ) ;
8787 break ;
8888
89- case "Tab" :
89+ case "Esc" : // IE specific value
90+ case "Escape" : {
91+ event . stopImmediatePropagation ( ) ;
9092 this . doClose ( ) ;
93+ break ;
94+ }
9195 }
9296 }
9397
9498 clickClose ( event ) {
95- if ( event . target === this . dialogConfig . parentRef . nativeElement . firstChild ||
99+ if ( this . dialogConfig . parentRef . nativeElement . firstChild . contains ( event . target ) ||
96100 this . listItems ( ) . some ( button => button === ( event . relatedTarget ) ) ||
97101 ( event . type === "focusout" && event . relatedTarget === this . dialogConfig . parentRef . nativeElement ) ) {
98102 return ;
You can’t perform that action at this time.
0 commit comments