Repository navigation
Commit 206208b
committed
fix: restore focus to input on Escape when listbox is focused
The listbox has tabIndex={-1} so it can receive focus (e.g. clicking
on padding or scrollbar). When Escape is pressed while the listbox
holds focus, close() hides it and the browser dumps focus to body.
Add input.current?.focus() after close(), matching the existing
pattern in choose().1 parent dc03180 commit 206208b
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
210 | 211 | | |
211 | 212 | | |
212 | 213 | | |
| |||
0 commit comments