From d6359de50c917bb979e9697a7acebd02542cadd9 Mon Sep 17 00:00:00 2001 From: seanick39 <46456503+seanick39@users.noreply.github.com> Date: Thu, 9 Jun 2022 23:37:46 +0530 Subject: [PATCH] [fix]: dialog p-overflow-hidden wasn't removed from body on dialog (#2982) unmount because of opposite if condition. --- components/lib/dialog/Dialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/lib/dialog/Dialog.js b/components/lib/dialog/Dialog.js index d6a2991708..845f1f3e75 100644 --- a/components/lib/dialog/Dialog.js +++ b/components/lib/dialog/Dialog.js @@ -291,7 +291,7 @@ export const Dialog = React.forwardRef((props, ref) => { if (props.modal) { let hasBlockScroll = document.primeDialogParams && document.primeDialogParams.some(param => param.hasBlockScroll); - if (!hasBlockScroll) { + if (hasBlockScroll) { DomHandler.removeClass(document.body, 'p-overflow-hidden'); } }