You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(overlay): stop using capture phase for overlay keyboard handling
OverlayKeyboardDispatcher is a document-level keyboard listener that
dispatches events to the topmost overlay that's listening for them.
It does it on capture as of e30852a in order to avoid missing events
whose propagation have been stopped. However, there are legitimate use
cases for stopping propagation and not wanting the overlay to hear about
it. For example, grid navigation based on the ARIA best practice allows
for enter to trap focus inside a grid cell and escape to leave it and
restore focus to the grid cell.
https://www.w3.org/TR/wai-aria-practices-1.1/#gridNav_inside
In these cases, we must be able to call stopPropagation and prevent the
escape keypress event from reaching the overlay.
Fixes#9928.
BREAKING CHANGE: OverlayKeyboardDispatcher (used in dialog and overlay
and available in the CDK) now listens on bubbling/propagation phase
instead of capture phase. This means that overlay keydown handlers
are now called after any applicable handlers inside of an overlay,
and it respects any stopPropagation() calls from inside the overlay.
0 commit comments