Repository navigation
[combobox] Clear highlight on inline blur when inline - #3973
Conversation
commit: |
Bundle size report
Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
sarthakmalik0810
left a comment
There was a problem hiding this comment.
@atomiks Thank you for the quick draft fix!
Do you think we could also store a lastActiveIndex, to restore highlight of the previously highlighted item before tabbing out of the Combobox?
I found this behavior to work in the ListBox component from react-aria-components.
|
Yeah I think that makes sense. We were going to build a separate Listbox component at some point, but an inline combobox gets most of the way there already |
b88c844 to
2d18c58
Compare
Greptile OverviewGreptile SummaryThis PR fixes the highlight behavior in inline combobox mode when the input loses and regains focus. Previously, when a user highlighted an item using keyboard navigation and then moved focus away (e.g., to a "Done" button in a dialog), the highlight would be lost permanently. This change preserves the The implementation:
The test verifies this behavior works correctly in a dialog scenario where focus moves between the input and a button. Confidence Score: 5/5
Important Files Changed
|
Fixes #3967