-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Dropdown is behind as z-index doesn't apply #1385
Comments
Same issue over here |
I think was fixed in 0.97.0. I just upgraded from 0.96.1 to 0.97.0 specifically to fix this problem (my dropdown was showing underneath my submit button). |
I'm using a new version than 0.97.0 (js grabbed from master) and my dropdowns are still behind the modal footer (from modal with fixed footer) with a scrollbar, as the materialize select |
I had a similar issue but the dropdown was being hidden by overflow (i.e. inside a .card) so I just changed overflow of the parent element to visible and that fixed it. |
Same issue for when dropdown is inside a collection. |
@nathanjohnson320's suggestion helped me fix the issue. In my case, I had a select inside of a |
I'm using dropdown within a collection and facing the same problem. .collection {
overflow: visible;
} solved it in my case, but I don't know if this messes with something else. |
@serkandurusoy, that's a good point. To prevent that, you could just use a class like .contacts-collection {
@extend .collection;
overflow: visible;
} This way, other collections won't be affected. |
@osxi thanks for the suggestion. |
@nathanjohnson320 |
Any news on this? |
I had the same problem: when i open the options/dropdown from a select inside a card the options appear behind the other cards in the page. I tried change the z-index, and it looked like was going to work... but it didn't. I put one card with a bigger z-index and all selects inside it gets in front of the others cards, and them i find myself in same problem, because the others cards also had selects and now they were behind the one that i just had increased the z-index. So i tried make the z-index change more dynamically using hover. Like this: .card { Now it is better... but is still get weird when the mouse goes out of the card with the select open. So i think i'll do a js with mouse-in ando mouse-out. But for now i'll use this second solution. |
The However, I've added the below snippet to my
|
This might be a stacking context issue as mentioned in this article https://philipwalton.com/articles/what-no-one-told-you-about-z-index/ I had a similar problem with card in main area overlapping dropdown-content in the top navbar. Setting the z-index of the navbar, which in my case was the parent of the dropdown-content, to 1 solved the issue. |
I'm having this problem again: overflow-y: visible on the .modal seemed to be the solution, but if one reduces the windows size or use it on mobile, the modal content "flows" over the screen outside the modal |
Changed z-index of dropdown in 42aa747. |
We still face the same issue mentioned by @joaorsfonseca |
We are not planning anymore releases to the v0.100.x version. I meant its fixed on our v1.0.0 alpha branch. Sorry for the confusion |
any workaround for this bug? |
I fixed a similar problem by giving the .card div where the inputs are style="z-index:100", |
Solution:
read more : here |
Nothing above worked for me (due to project particularities). My solution was to overcome the stacking context, increasing the parent's (and in some cases grand-parent's) z-index value. |
Having the same issue. Not seeing a solution. Why is this even a problem, people have already done this and already solved these issues with matured versions of js plugins like Chosen, Select2 etc. |
@timothymarois agreed, not even sure if this is really maintained anymore. |
They claim to have fixed it in 1.0.0, but I'm still having this problem: https://codepen.io/anon/pen/oaJOEj Edit: Cleared it up. Have to say this is not intuitive at all
|
This was our solution:
|
Really it is not, this should be pointed out in the documentation |
This issue doesn't apply to the current release version 0.96.1, only to the current master branch.
The problem is that a (not yet released) change is attaching the dropdown element to the activator element, therefore forcing the dropdown menu to adopt the z-index of the activator's parent causing it to be partially hidden in various cases.
Previously, I was placing dropdown elements inside the body element, they were showing in the right place and above anything as dropdown elements have z-index of 999.
Now, dropdown elements, no matter where you put them, end up being next to their activators and therefore adopting the z-index of their activator's parent.
In my case, I have a list of boxes, all with identical z-index (well below the defined 999 of a dropdown menu) and a menu button at their right edge. Since the dropdown adopts the box's z-index, the dropdown is always hidden by the next box in the list, as the next box was appended later to the page and therefore appears above the previous.
The text was updated successfully, but these errors were encountered: