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

useRef element results in z-index issue's. #81

Open
is-it-ayush opened this issue Sep 9, 2022 · 1 comment
Open

useRef element results in z-index issue's. #81

is-it-ayush opened this issue Sep 9, 2022 · 1 comment

Comments

@is-it-ayush
Copy link

Problem

I have a component that slides from left to right over on top of a list. Everything works fine without auto-animate. As soon as ref={parent} is added to the list to make it lively (with auto-animate). The list somehow goes on top of that component making that component practically un-useable. How should I got about fixing this. I am using tailwind but the z-index property does not seem to work if i use auto-animate.

Current Behaviour:

image

Expected Behaviour:

image

@MarlonX19
Copy link

MarlonX19 commented Apr 16, 2024

I had the same issue just yesterday when I had a similar scenario. The thing is not related to z-index apparently, instead it's related to the position relative that the div will receive when using the ref={parent}, at least that's what I found out after inspecting the code, take a look throught the dev tools and you'll probably see that there's an inline position relative added to the parent div!

I wonder oif maybe there's a reason for that?!

workaround: I added a position: static !important to the div's styles and it solved the issue for now.

I've been busy with the back log of tasks but I might want to look deeper into this issue and maybe solve it.

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

2 participants