Commit 92c29c8
fix(cdk/a11y): error if FocusMonitor is used on non-element nodes (#20640)
* Fixes an error thrown when trying to stop monitoring a non-element node. Now `FocusMonitor.monitor` is a noop.
* Fixes an error on init if the `cdkMonitorFocus` directive is placed on a non-element node.
Related to #20632.
(cherry picked from commit 9edab81)1 parent 9a0c4c0 commit 92c29c8
File tree
2 files changed
+24
-7
lines changed- src/cdk/a11y/focus-monitor
2 files changed
+24
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
| 354 | + | |
354 | 355 | | |
355 | 356 | | |
356 | 357 | | |
| |||
548 | 549 | | |
549 | 550 | | |
550 | 551 | | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
551 | 560 | | |
552 | 561 | | |
553 | 562 | | |
| |||
610 | 619 | | |
611 | 620 | | |
612 | 621 | | |
| 622 | + | |
613 | 623 | | |
614 | 624 | | |
615 | 625 | | |
616 | 626 | | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
229 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
230 | 232 | | |
231 | 233 | | |
232 | 234 | | |
233 | | - | |
234 | | - | |
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| |||
570 | 570 | | |
571 | 571 | | |
572 | 572 | | |
| 573 | + | |
573 | 574 | | |
574 | | - | |
575 | | - | |
576 | | - | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
577 | 578 | | |
578 | 579 | | |
579 | 580 | | |
| |||
0 commit comments