primeng
primeng copied to clipboard
Dialog [blockScroll]="true" does not work when a dialog is opened from another
I'm submitting a ... (check one with "x")
[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
Plunkr Case (Bug Reports) Here is stackblitz working sample: https://stackblitz.com/edit/primeng-dialog-demo-xhhkrf?file=src/app/app.component.html
Current behavior
When you open modal dialog with [blockScroll]="true"
from another dialog, body scrollbar is enabled.
Expected behavior
Hide body scrollbar if both dialogs has property [blockScroll] set to "true".
Minimal reproduction of the problem with instructions Here is working sample: https://stackblitz.com/edit/primeng-dialog-demo-xhhkrf?file=src/app/app.component.html
Just open dialog and click on "Switch" button.
What is the motivation / use case for changing the behavior?
Does not apply.
Please tell us about your environment: Windows 10, VSCode, Angular-CLI
- Angular version: 10.1.1
- PrimeNG version: 10.0.3
- Browser: 86.0.4240.193
Hi,
So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you reopen the issue so we can include it in our roadmap? Please don't forget to add your feedback as a comment after reopening the issue. These will be taken into account by us and will contribute to the development of this feature. Thanks a lot for your understanding!
Best Regards,
@emiliobristech can You please verify it? I think it still exists in 14.2.1 version
Hi, I am facing the same issue but with a combination of dialog opened via DialogService and p-dialog. Steps:
- Open a dialog via the dialog service.
- Close it and open a p-dialog immediately.
- Background starts to scroll as "p-overflow-hidden" class is removed by the dialog service and is not added by the p-dialog again when [modal]="true".
Please let me know if you need more clarification.
The issue persists in 17.11. The scroll under the overlay reappears when opening a dialog from within the sidebar component and then closing it.