Closing nested dialog removes CSS class still needed for parent dialog #15779
Labels
PRO Support
Issue was reported by PRO User
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
Behaviour
When opening a dialog primeng adds the
p-overflow-hidden
class to the body which hides the scroll bar and adds padding to prevent the content from shifting. When a user closes a dialog then this class is removed from the body.Bug
When a user opens a nested dialog and then closes it, the
p-overflow-hidden
class is removed from the body despite the parent modal still being present.This is demonstrated on your website in the last example
Environment
I am running a web application on an Ubuntu OS, however this issue is present in your examples where you show nested dialogs here
Because of this I do not believe it is an issue with my environment.
Reproducer
No response
Angular version
16.2.12
PrimeNG version
16.0.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.19.0
Browser(s)
Brave v1.66.118, Chrome v125.0.6422.113 (Official Build) (64-bit)
Steps to reproduce the behavior
Expected behavior
I would expect that the css class which is added when a modal is opened would persist on the body as long as there is a modal open. When the final modal is closed then this css class should be removed.
The text was updated successfully, but these errors were encountered: