-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Describe the bug
Description
The Drawer component is incorrectly handling body scroll lock when the dismissable prop changes.
When the drawer is opened and dismissable = true, the body scroll is blocked as expected.
If the dismissable prop is later updated to false while the drawer is still open, the body scroll is unblocked, even though the drawer remains visible.
This behavior is inconsistent because body scroll should remain blocked whenever the drawer is open, regardless of the dismissable value.
Pull Request Link
Reproducer
https://stackblitz.com/edit/primevue-4-vite-issue-template-bzlp5ypq?file=src%2FApp.vue
Environment
Vue: v3.5.21
PrimeVue: v4.3.9
Browser: Chrome
OS: Windows 11
Vue version
3.5.21
PrimeVue version
4.3.9
Node version
No response
Browser(s)
Chrome 140.0.7339.128 (Official Build) (arm64)
Steps to reproduce the behavior
Steps to Reproduce
- Render a Drawer component with dismissable = true.
- Open the Drawer.
- Body scroll is blocked (correct).
- Change dismissable to false while the Drawer is still open.
- Body scroll becomes unblocked, even though the Drawer is still visible.
Expected behavior
Body scroll should remain blocked as long as the Drawer is open.
The dismissable prop should only control whether the Drawer can be dismissed by the user, not whether body scroll is locked.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status