Commit 3941bf2
committed
fix(select): don't restore focus unless an option was selected
Currently `mat-select` always restores focus to its trigger whenever the panel is closed. This can be problematic, because the user might've scrolled away and restoring focus would scroll the page back up. These changes switch to only restoring focus if the user made a selection.
Fixes #8915.1 parent f95f832 commit 3941bf2
2 files changed
+29
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2421 | 2421 | | |
2422 | 2422 | | |
2423 | 2423 | | |
| 2424 | + | |
| 2425 | + | |
| 2426 | + | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
| 2430 | + | |
| 2431 | + | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
| 2437 | + | |
| 2438 | + | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
2424 | 2443 | | |
2425 | 2444 | | |
2426 | 2445 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
| 300 | + | |
| 301 | + | |
300 | 302 | | |
301 | | - | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
302 | 306 | | |
303 | 307 | | |
304 | 308 | | |
| |||
547 | 551 | | |
548 | 552 | | |
549 | 553 | | |
550 | | - | |
551 | 554 | | |
552 | 555 | | |
553 | 556 | | |
| |||
696 | 699 | | |
697 | 700 | | |
698 | 701 | | |
699 | | - | |
| 702 | + | |
700 | 703 | | |
701 | 704 | | |
702 | 705 | | |
| |||
706 | 709 | | |
707 | 710 | | |
708 | 711 | | |
| 712 | + | |
| 713 | + | |
709 | 714 | | |
710 | | - | |
711 | 715 | | |
712 | 716 | | |
713 | 717 | | |
| |||
835 | 839 | | |
836 | 840 | | |
837 | 841 | | |
838 | | - | |
| 842 | + | |
839 | 843 | | |
| 844 | + | |
840 | 845 | | |
841 | 846 | | |
842 | 847 | | |
| |||
0 commit comments