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

Nesting components no longer possible #2843

Closed
1 of 3 tasks
dvlden opened this issue Sep 5, 2024 · 3 comments
Closed
1 of 3 tasks

Nesting components no longer possible #2843

dvlden opened this issue Sep 5, 2024 · 3 comments

Comments

@dvlden
Copy link

dvlden commented Sep 5, 2024

Description

When we nest some components into another, it no longer behaves correctly after the recent update that fixes animations for all components.

Link to Reproduction (or Detailed Explanation)

https://stackblitz.com/edit/vitejs-vite-y6tpym?file=src%2FApp.vue

Steps to Reproduce

  1. Open the repro
  2. Click to open main popover
  3. Click each popover inside
  • The popovers inside cannot be closed
  • Opening another popover does not close the previous one

Ark UI Version

3.11.0

Framework

  • React
  • Solid
  • Vue

Browser

All (any version)

Additional Information

Here's a thread where I provided some screenshots from my app. In my app, they are all open by default with the latest update, but nonetheless they cannot be closed, just like in the demo. With or without animation, it does not make a difference.

https://discord.com/channels/964648323304808488/964649581398855690/1280462194919604255

I want to note that this is not just with popovers. I tried nesting HoverCard inside Popover and it failed too. So I'll assume it's any component within any component that uses Float UI.

@Omikorin
Copy link
Collaborator

Omikorin commented Sep 5, 2024

I resolved your issue by removing flex from the Popover.Content.
This element is controlled by Zag.js logic and shouldn't be given an inline style that overrides it (tailwind is the cause)

-<Popover.Content class="z-[--z-index] flex flex-col gap-y-1 overflow-clip rounded bg-white shadow-xl ring-1 ring-slate-100">
+<Popover.Content class="z-[--z-index] flex-col gap-y-1 overflow-clip rounded bg-white shadow-xl ring-1 ring-slate-100">

Repro: https://stackblitz.com/edit/vitejs-vite-rbyjdd?file=src%2FApp.vue,package.json

@segunadebayo
Copy link
Member

Closing based on @Omikorin's comment above.

@dvlden
Copy link
Author

dvlden commented Sep 6, 2024

Oh... Feeling embarrassed now. How did I not see this xD
Thanks @Omikorin !

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

No branches or pull requests

3 participants