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

Closing nested dialog removes CSS class still needed for parent dialog #15779

Closed
cmicallefcaci opened this issue Jun 3, 2024 · 0 comments · Fixed by #15845
Closed

Closing nested dialog removes CSS class still needed for parent dialog #15779

cmicallefcaci opened this issue Jun 3, 2024 · 0 comments · Fixed by #15845
Assignees
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

Comments

@cmicallefcaci
Copy link

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

  • Find any nested dialog example (final example on this page)
  • Open your browser developer tools so that you have a view of the body template.
  • click on the Open Dialog button.
  • notice the appropriate css classes being applied to body template
  • Open nested dialog
  • Close nested dialog
  • notice that css class has been removed from body template

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.

@cmicallefcaci cmicallefcaci added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jun 3, 2024
@mehmetcetin01140 mehmetcetin01140 added the PRO Support Issue was reported by PRO User label Jun 14, 2024
@mehmetcetin01140 mehmetcetin01140 self-assigned this Jun 14, 2024
@mehmetcetin01140 mehmetcetin01140 added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jun 14, 2024
@mehmetcetin01140 mehmetcetin01140 added this to the 17.18.2 milestone Jun 14, 2024
cetincakiroglu added a commit that referenced this issue Jun 27, 2024
Fixed #15779 - Closing nested dialog removes CSS class still needed f…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants