primefaces / primevue

Next Generation Vue UI Component Library
https://primevue.org
MIT License
9.57k stars 1.15k forks source link

Dialog (Modal): p-overflow-hidden is removed from body, when the first modal is closed #3953

Open michastubi opened 1 year ago

michastubi commented 1 year ago

Describe the bug

When multiple modals are opened, p-overflow-hidden is removed from body, when the first one is closed.

Reproducer

https://codesandbox.io/p/sandbox/primevue-demo-forked-1i9vei?file=%2Fsrc%2FApp.vue%3A70%2C37

PrimeVue version

3.28.0

Vue version

3.x

Language

TypeScript

Build / Runtime

Nuxt

Browser(s)

https://codesandbox.io/p/sandbox/primevue-demo-forked-1i9vei?file=%2Fsrc%2FApp.vue%3A70%2C37

Steps to reproduce the behavior

  1. Create a Dialog with modal
  2. In this dialog open a second modal
  3. Close the second modal

Expected behavior

When multiple modals are opened, p-overflow-hidden is removed from body, when the last one is closed.

eneeio-nm commented 1 year ago

I'm having a similar issue, except it involves using the Sidebar component and ConfirmDialog component. If the Sidebar component is open and has blockScroll set to true, and then something inside the Sidebar triggers the ConfirmDialog, when the user dismisses the ConfirmDialog this then removes the p-overflow-hidden class.

eneeio-nm commented 1 year ago

FYI I have created a separate bug #3981 for my issue. Hopefully PrimeTek will resolve these quickly 🤞

Mooenz commented 4 months ago

posible solution:

// In Githubissues.

  • Githubissues is a development platform for aggregating issues.