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

Resolve initialFocusRef correctly #1276

Merged
merged 2 commits into from
Mar 27, 2022
Merged

Resolve initialFocusRef correctly #1276

merged 2 commits into from
Mar 27, 2022

Conversation

RobinMalfait
Copy link
Collaborator

If you are passing a Ref to a component, you don't get the underlying
DOM node even if you put it on the element manually. The ref will be a
ref to the component.

This means that the initialFocusRef can be a DOM element or a Vue
component instance. Resolving it guarantees us to resolve to an
HTMLElement or null but not a component.

If you are passing a Ref to a component, you don't get the underlying
DOM node even if you put it on the element manually. The ref will be a
ref to the _component_.

This means that the initialFocusRef can be a DOM element or a Vue
component instance. Resolving it guarantees us to resolve to an
HTMLElement or null but not a component.
@vercel
Copy link

vercel bot commented Mar 27, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

headlessui-vue – ./packages/playground-vue

🔍 Inspect: https://vercel.com/tailwindlabs/headlessui-vue/9G3k7nqL3aoG95RChDvCuCrt6Mxb
✅ Preview: https://headlessui-vue-git-resolve-focus-ref-tailwindlabs.vercel.app

headlessui-react – ./packages/playground-react

🔍 Inspect: https://vercel.com/tailwindlabs/headlessui-react/BnPSwF8g56ES94NuS1QmN66m6tJF
✅ Preview: https://headlessui-react-git-resolve-focus-ref-tailwindlabs.vercel.app

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

1 participant