File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ export class OverlayKeyboardDispatcher implements OnDestroy {
51
51
}
52
52
53
53
/**
54
- * Subscribe to all key events that land on the body and dipatch those
54
+ * Subscribe to all key events that land on the body and dispatch those
55
55
* events to the appropriate overlay.
56
56
*/
57
57
private _dispatchKeyboardEvents ( ) : void {
@@ -76,6 +76,7 @@ export class OverlayKeyboardDispatcher implements OnDestroy {
76
76
const targetedOverlay = this . _attachedOverlays . find ( overlay =>
77
77
overlay . overlayElement . contains ( event . target as HTMLElement ) ) ;
78
78
79
+ // Use that overlay if it exists, otherwise choose the most recently attached one
79
80
return targetedOverlay ? targetedOverlay : overlays [ overlays . length - 1 ] ;
80
81
}
81
82
You can’t perform that action at this time.
0 commit comments