Skip to content
Bug reportOct 9, 2026· 0:26· 0 views

PrimeVue 5.0.2: closing a nested dialog removes body scroll-lock while outer dialog stays open

0:26 total

Comments · 0

Be the first to comment.

Bug report— by SceneRecap AI

mediumDialog / DynamicDialog service
os: macOSbrowser: Chromium 151.0.7922.34viewport: 1280x720

Repro steps

  1. 1.Navigate to the PrimeVue Dynamic Dialog component documentation page.
  2. 2.Scroll down to the 'Example' section and click 'Select a Product' to open the primary Dynamic Dialog.
  3. 3.Inside the 'Product List' dialog, click the 'Nested Dialog' button to open a second dialog on top.
  4. 4.Click the 'Close' button inside the nested 'Information' dialog.
  5. 5.Observe document body scroll behavior while the outer dialog remains visible.

Expected

The document body should retain the 'p-overflow-hidden' scroll lock class as long as any modal dialog (the outer 'Product List' dialog) remains active.

Actual

'p-overflow-hidden' is cleared immediately when the nested dialog closes, unlocking page scrolling in the background while the parent dialog is still open.

Evidence

consoleConsole logs confirm initial modal lock: 'After outer dialog open — body class: "p-overflow-hidden" (expected: "p-overflow-hidden")' and 'After nested dialog open — 2 dialogs, body class: "p-overflow-hidden" (overflow-hidden still present)'.
consoleConsole logs state change upon closing nested dialog: 'After inner dialog closed — 1 dialogs remaining, outer visible: true, body class: "" (BUG: overflow-hidden removed while outer dialog open)'.
visualA notification banner appears at the bottom indicating: 'body: p-overflow-hidden MISSING - scroll unlocked (BUG)', and the background page behind the active 'Product List' dialog scrolls.
Issue markdown (copy-paste ready)
### Summary
Closing a nested dynamic dialog removes the `p-overflow-hidden` class from the `<body>` element, unlocking background scrolling even though the parent modal dialog remains open.

### Steps to Reproduce
1. Go to the PrimeVue Dynamic Dialog documentation (`/dynamicdialog`).
2. In the interactive demo, click **Select a Product** to open the primary dialog.
3. Click **Nested Dialog** to open the secondary 'Information' dialog.
4. Click **Close** on the nested dialog.
5. Try scrolling the background page.

### Expected Result
`body` should keep the `p-overflow-hidden` class to maintain scroll lock until all active modal dialogs are closed.

### Actual Result
Closing the child dialog unsets `p-overflow-hidden` completely (`body.className = ""`), permitting background scroll while the outer dialog is still visible and interactive.

### Evidence
- Console log at 16.3s: `After inner dialog closed — 1 dialogs remaining, outer visible: true, body class: "" (BUG: overflow-hidden removed while outer dialog open)`
- Visual confirmation at 19.0s: Indicator banner confirms missing class and background scroll occurs at 18.4s and 22.5s.

*Recorded with SceneRecap.*

Your recordings could explain themselves too.

Free plan · silent recordings welcome · bug reports included.

Try SceneRecap free →
PrimeVue 5.0.2: closing a nested dialog removes body scroll-lock while outer dialog stays open · SceneRecap