Skip to content

Fix incorrect behavior of isTyping#3596

Closed
velopsey wants to merge 1 commit intotailwindlabs:mainfrom
velopsey:fix/issue-3595
Closed

Fix incorrect behavior of isTyping#3596
velopsey wants to merge 1 commit intotailwindlabs:mainfrom
velopsey:fix/issue-3595

Conversation

@velopsey
Copy link
Contributor

This PR fixes an issue where navigating from one Combobox to another using the Tab key blocked the displayValue from updating in the next render.

The issue was partially introduced in this PR: #3259.

Currently, any interaction with the keyboard activates a mode that prevents the value from being updated.

My fix is a straightforward solution, but as maintainers of this library, you may have a better idea of how to address this bug. I’d be happy to implement any suggestions you provide.

Thank you for your work — this library truly helps make my interfaces better

Fixes: #3595

@vercel
Copy link

vercel bot commented Dec 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
headlessui-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 15, 2024 6:19pm
headlessui-vue ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 15, 2024 6:19pm

@velopsey
Copy link
Contributor Author

@RobinMalfait I’d really appreciate it if you could take a look at this fix. It’s simple and easy to understand, and I’m happy to respond quickly to any questions or feedback. This will genuinely help my company (takeda.com)

@RobinMalfait
Copy link
Member

Hey!

Sorry about the delay, but thanks for the PR! The PR was a bit behind, so rebasing wasn't as straight forward. To keep things easy, I opened a new PR (#3785) to solve this issue.

I also added you as a co-author of that PR. Thanks again!

pull bot pushed a commit to Tiamat-Tech/headlessui that referenced this pull request Sep 5, 2025
…ut value (tailwindlabs#3785)

We prevent syncing the `ComboboxInput` value while you are typing.
However, when you press `Tab` there is keyboard event causing the
component to be marked as if you are currently typing. But since we are
tabbing away from the input we should not be "typing" anymore.

This ensures that the `input` can be updated with whatever the current
value should be.

Fixes: tailwindlabs#3738
Fixes: tailwindlabs#3595
Fixes: tailwindlabs#3537
Closes: tailwindlabs#3596

---------

Co-authored-by: Daniil Savitskii <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Combobox breaks when selecting a value using the keyboard

3 participants