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

[Bug]: Dialog / Sheet should NOT add pointer-events: none to body tag when opened #1540

Open
2 tasks
titusdecali opened this issue Nov 28, 2024 · 2 comments
Open
2 tasks
Labels
question Further information is requested

Comments

@titusdecali
Copy link

titusdecali commented Nov 28, 2024

Reproduction

https://stackblitz.com/run?file=src%2FApp.vue

Describe the bug

(Would actually like a "Discussion" tag as this isn't really a bug)

Both the Dialog and Sheet components are setting pointer-events: none to the body tag when opened. This prevents using things like lightboxes above the Sheet, or emoji pickers inside of a Dialog. I've had numerous issues with this already and just now realized the cause of the issue.

I don't think it's necessary to set this on the body tag and would likely be better not to due to these issues.
If there are edge cases, users can simply add a z-index to solve the vast majority of issues.

Would like to see some discussion about this and find a better way to cover whatever reasons there were when this was first added.

For now, I'm just manually removing it as needed, but the issue isn't at first obvious and could cause a lot of wasted time for devs.

SHOT 12 01 33@2x

System Info

"nuxt": "^3.14.1592",
"radix-vue": "^1.9.10",
"shadcn-nuxt": "^0.10.4"

Contributes

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests
@titusdecali titusdecali added the bug Something isn't working label Nov 28, 2024
@sadeghbarati sadeghbarati added need-reproduction Issue is lacking reproduction. Will be close if not provided. and removed bug Something isn't working labels Nov 28, 2024
@sadeghbarati
Copy link
Collaborator

Your Stackblitz link is not ready, you need to save the playground or fork it

@sadeghbarati sadeghbarati added question Further information is requested and removed need-reproduction Issue is lacking reproduction. Will be close if not provided. labels Dec 3, 2024
@artyom12211
Copy link

+1
It would be nice add it when needed.

@sadeghbarati sadeghbarati transferred this issue from unovue/shadcn-vue Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants