Commit b7f77af
committed
[FIX] topbar: close font size dropdown and keep focus on the grid
Pressing Tab in the font size editor could move focus to the hidden
“add more rows” footer. The browser then auto-scrolled to that footer
while the grid viewport state stayed unchanged, making the footer look
like it was floating above the grid.
We now handle Tab on the font size input: we prevent the default
navigation, close the dropdown, and redirect focus back to the grid
composer instead of the footer. This keeps the layout stable when
tabbing from the toolbar.
Alternative approaches considered but discarded:
- Closing on blur and refocusing the grid: clicking the arrow caused
the input to blur first, so the blur handler closed the dropdown and
the arrow click immediately reopened it, making it impossible to
close the dropdown.
- Using mousedown to distinguish internal clicks: this fired before
selecting an item in the dropdown, so the dropdown closed too early
and the item click was never applied.
Task: 5263792
X-original-commit: 99a94ac1 parent 62b85c8 commit b7f77af
File tree
6 files changed
+44
-2
lines changed- src/components
- number_editor
- tests
- grid/__snapshots__
- spreadsheet/__snapshots__
6 files changed
+44
-2
lines changedLines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
| 61 | + | |
| 62 | + | |
59 | 63 | | |
| 64 | + | |
| 65 | + | |
60 | 66 | | |
61 | 67 | | |
62 | 68 | | |
| |||
133 | 139 | | |
134 | 140 | | |
135 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
136 | 149 | | |
137 | 150 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
835 | 835 | | |
836 | 836 | | |
837 | 837 | | |
| 838 | + | |
838 | 839 | | |
839 | 840 | | |
840 | 841 | | |
841 | 842 | | |
842 | 843 | | |
| 844 | + | |
843 | 845 | | |
844 | 846 | | |
845 | 847 | | |
| |||
1842 | 1844 | | |
1843 | 1845 | | |
1844 | 1846 | | |
| 1847 | + | |
1845 | 1848 | | |
1846 | 1849 | | |
1847 | 1850 | | |
1848 | 1851 | | |
1849 | 1852 | | |
| 1853 | + | |
1850 | 1854 | | |
1851 | 1855 | | |
1852 | 1856 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
451 | 452 | | |
452 | 453 | | |
453 | 454 | | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
454 | 475 | | |
455 | 476 | | |
456 | 477 | | |
| |||
0 commit comments