Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Combobox input cursor position #1572

Closed
wants to merge 1 commit into from

Conversation

danr-za
Copy link
Contributor

@danr-za danr-za commented Jun 10, 2022

Currently, when selecting an option in the Combobox, the focus is causing the cursor to move to the beginning which happens because of RAF.
Focus using microtask fixes the behavior.

@vercel
Copy link

vercel bot commented Jun 10, 2022

@danr-za is attempting to deploy a commit to the Tailwind Labs Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Jun 10, 2022

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

Name Status Preview Updated
headlessui-react ❌ Failed (Inspect) Jun 10, 2022 at 0:33AM (UTC)

import { Hidden, Features as HiddenFeatures } from '../../internal/hidden'
import { useOpenClosed, State, OpenClosedProvider } from '../../internal/open-closed'
import { Features as HiddenFeatures, Hidden } from '../../internal/hidden'
import { OpenClosedProvider, State, useOpenClosed } from '../../internal/open-closed'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't do all of this re-ordering in other projects :)

@RobinMalfait RobinMalfait changed the title fix(combobox): fix focus on option select Improve Combobox input cursor position Jun 10, 2022
@RobinMalfait
Copy link
Collaborator

Hey! Thank you for your PR!
Much appreciated! 🙏

I've made some changes and started from your original branch. More info: #1574

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.

None yet

2 participants