Skip to content

Commit 51ce874

Browse files
mleibmanmmalerba
authored andcommitted
Add a comment explaining why we need to walk up the tree
1 parent 6d96332 commit 51ce874

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/cdk/a11y/focus-monitor/focus-monitor.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ export class FocusMonitor implements OnDestroy {
186186
*/
187187
private _documentFocusAndBlurListener = (event: FocusEvent) => {
188188
const target = event.target as HTMLElement|null;
189+
// We need to walk up the ancestor chain in order to support `checkChildren`.
189190
for (let el = target; el; el = el.parentElement) {
190191
if (event.type === 'focus') {
191192
this._onFocus(event as FocusEvent, el);

0 commit comments

Comments
 (0)