cschroeter / park-ui

Beautifully designed components built with Ark UI and Panda CSS that work with a variety of JS frameworks.
https://park-ui.com
MIT License
1.74k stars 75 forks source link

Menus within Modals (Dialogs) #426

Closed Southclaws closed 2 months ago

Southclaws commented 2 months ago

I'm trying to get a Menu component working inside a Dialog, the first roadblock I hit was that the default z-index for Menu seems to be "dropdown" (1000) which is lower than "modal" (1400) so I fixed that by changing the Menu recipe to use "popover" (1500) for the z-index, after this fix the Menu is now correctly rendering on top of Dialog components instead of behind.

But now, whenever I mouse-over the items in the menu, or click anywhere in the <Menu.Content>, it closes. I'm not sure what's going on or even where, it could be any one of: Zag, Ark, Panda or Park (separation of concerns can be exhausting!)

Any ideas? I've just recently upgraded Ark and Panda to their latest versions (which in turn upgrades Zag too) so I'm unsure what's causing this.

dannylin108 commented 2 months ago

I found similar bug for touch devices

https://github.com/chakra-ui/ark/issues/2816