nuxt / ui

A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.
https://ui.nuxt.com
MIT License
3.4k stars 374 forks source link

UDropdown is displaying underneath some page elements #1736

Open RaulRohjans opened 2 weeks ago

RaulRohjans commented 2 weeks ago

Environment

Version

@nuxt/ui": "^2.13.0

Reproduction

Description should be clear.

Description

I have a navbar with a UDropdown for some user options in my default layout. The issue is that certain elements will display over the dropdown, such as inputs and some UTable borders

image

Additional context

No response

Logs

No response

KonradDRAST commented 1 week ago

Same here. It probably have something to do with "transform: translate()" on the dropdown container. There is class z-20 added on the same container, but the translation resets stacking context, and in the end, probably causes an issue.

KonradDRAST commented 1 week ago

I was checking all elements and (in my case) the problem arose because of some relatively positioned elements down below. Once I added classes relative z-20 to my header problem was solved.

Probably not a bug then, but an issue with CSS stacking context in your project.

RaulRohjans commented 1 week ago

Maybe this could be fixed by rendering the dropdown at the bottom of the DOM and then positioning it where it should be displayed, does the component provide a way of doing that?