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

va-select dropdown is rendered below other components #3399

Closed
JohanAndreVisma opened this issue May 3, 2023 · 9 comments · Fixed by #3403
Closed

va-select dropdown is rendered below other components #3399

JohanAndreVisma opened this issue May 3, 2023 · 9 comments · Fixed by #3403
Assignees
Labels
BUG Something isn't working d3: medium No cheats. Monsters a bit faster. v4: must have This is something really user want to have

Comments

@JohanAndreVisma
Copy link

JohanAndreVisma commented May 3, 2023

Vuestic-ui version: 1.6.4

Steps to reproduce Just a simple page with va-select and other gui components.
Build using vue-cli and deploy to Azure.

What is the expected behavior? va-select dropdown is rendered above other components.

What is the current behavior? va-select dropdown is rendered above other components.

Other information I think that the necessary z-index css info gets lost somehow during the build and deployment to Azure.
When running locally it works. So either some problem with vuestic or there might be a problem with my project and or build process.
image-20230502-073044

@JohanAndreVisma JohanAndreVisma added the BUG Something isn't working label May 3, 2023
@m0ksem
Copy link
Collaborator

m0ksem commented May 4, 2023

You can manually try to set z-index: 999999 to .va-dropdown__content. If it doesn't help, you probably have z-index issue somewhere above in DOM tree. You can use prevent-overflow prop to render dropdown content at the highest layer or try to find z-index issues. I would recommend not to use prevent-overflow in general, but it okay to use it in such cases.

LMK if changing z-index to 99999999 helped.

@m0ksem m0ksem added d3: medium No cheats. Monsters a bit faster. v4: must have This is something really user want to have labels May 4, 2023
@JohanAndreVisma
Copy link
Author

JohanAndreVisma commented May 4, 2023

@m0ksem Yes I will try to set z-index manually today. I expect it to work.
It does not seems like I have some other z-index issue in DOM. I never set any z-index in my own css styles
and it also works locally.
I think the problem is caused by the fact that part of the Vuestic css that sets z-index does not exist in my production build.
Could it be some so called tree shaking that has removed it.
I attached a screenshot where the only va-dropdown styling found in production can be seen.

z-index error prod

@JohanAndreVisma
Copy link
Author

When running locally I also have css styling for .va-dropdown__content-wrapper but this seems to be missing from production.
z-index works locally

@m0ksem
Copy link
Collaborator

m0ksem commented May 4, 2023

When running locally I also have css styling for .va-dropdown__content-wrapper but this seems to be missing from production.

Thanks. Can confirm the same issue using vite.

@m0ksem m0ksem self-assigned this May 4, 2023
@m0ksem m0ksem moved this from Backlog to In Progress in Vuestic Dashboard May 4, 2023
@JohanAndreVisma
Copy link
Author

Does vuestic has snapshot tests that checks these kind of bugs? If not I guess that would be a good idea.

m0ksem added a commit to m0ksem/vuestic-ui that referenced this issue May 4, 2023
@m0ksem
Copy link
Collaborator

m0ksem commented May 4, 2023

Does vuestic has snapshot tests that checks these kind of bugs? If not I guess that would be a good idea.

I think it was one time edge case, which is hard to predict and write a test. If you have any suggestions related to testing, I would appreciate making another issue and help us with it!

@JohanAndreVisma
Copy link
Author

@m0ksem As expected adding this to my own css file solved the problem:
.va-dropdown__content-wrapper { z-index: 1000; }

@m0ksem
Copy link
Collaborator

m0ksem commented May 5, 2023

@m0ksem As expected adding this to my own css file solved the problem:
.va-dropdown__content-wrapper { z-index: 1000; }

I made a pr fixing this, so you can remove this code next week.

@JohanAndreVisma
Copy link
Author

@m0ksem Great, thanks for the quick fix

@asvae asvae moved this from In Progress to QA / Review in Vuestic Dashboard May 15, 2023
m0ksem added a commit that referenced this issue May 23, 2023
@github-project-automation github-project-automation bot moved this from QA / Review to Done in Vuestic Dashboard May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Something isn't working d3: medium No cheats. Monsters a bit faster. v4: must have This is something really user want to have
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants