Listbox overlays another Listbox #1583
Replies: 6 comments 5 replies
-
To everyone that find this problem, just add If that doesn't work try to increase the number of z-index. "The z-index property specifies the stack order of an element. An element with greater stack order is always in front of an element with a lower stack order." @filip-lebiecki for me that solved the problem. |
Beta Was this translation helpful? Give feedback.
-
Came across this issue today. I found that adding This modified the Headless UI Docs example. |
Beta Was this translation helpful? Give feedback.
-
I'm having this issue with Vue and none of the solutions provided work for me. Did somebody have success solving this in headlessui Vue? |
Beta Was this translation helpful? Give feedback.
-
I believe this is a very hard issue to fix.. it has to do with the order in which you generate your listboxes, since the items are a child of the trigger and you can only apply z-index that will be respected to the parent trigger element, you will always run into a problem if you place a listbox with a lower z-index value underneath a listbox with a higher value. After much pain, I was able to overcome the issue by adding an emitter to my dropdown component that makes the parent component apply a higher z-index value to the dropdown that is currently activated and a lower value to all other dropdowns. |
Beta Was this translation helpful? Give feedback.
-
The problem here is |
Beta Was this translation helpful? Give feedback.
-
Hello,
I'm trying to build a very simple component that consists of few Listbox's one under/below the other.
<div>
<Listbox>
</Listbox>
<Listbox>
</Listbox>
</div>
When I open the top Listbox the popup with items/options is being display under/behind the second Listbox element.
I've tried adding "z-.." without success. I would want the popup to overlay everything there is (be displayed on top).
Any suggestions? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions