Skip to content

Commit dc448e3

Browse files
committed
Add a comment explaining why we need to walk up the tree
1 parent 8033ac9 commit dc448e3

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
@@ -139,6 +139,7 @@ export class FocusMonitor implements OnDestroy {
139139
*/
140140
private _documentFocusAndBlurListener = (event: FocusEvent) => {
141141
const target = event.target as HTMLElement|null;
142+
// We need to walk up the ancestor chain in order to support `checkChildren`.
142143
for (let el = target; el; el = el.parentElement) {
143144
if (event.type === 'focus') {
144145
this._onFocus(event as FocusEvent, el);

0 commit comments

Comments
 (0)