Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetcetin01140 committed Mar 5, 2024
1 parent f58ae7a commit 19ff3e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app/components/dialog/dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -626,9 +626,10 @@ export class Dialog implements AfterContentInit, OnInit, OnDestroy {
this.unbindMaskClickListener();
}

const dialogElements = document.querySelectorAll('.p-dialog');
// for nested dialogs w/modal
const scrollBlockers = document.querySelectorAll('.p-dialog-mask-scrollblocker');

if (this.modal && !dialogElements) {
if (this.modal && scrollBlockers && scrollBlockers.length == 1) {
DomHandler.unblockBodyScroll();
}

Expand Down

0 comments on commit 19ff3e8

Please sign in to comment.