Skip to content

Commit

Permalink
Fix primefaces#4938: Dialog remove blockscroll on unmount
Browse files Browse the repository at this point in the history
melloware committed Sep 21, 2023
1 parent 72d9a0b commit 9a73379
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/lib/dialog/Dialog.js
Original file line number Diff line number Diff line change
@@ -341,7 +341,7 @@ export const Dialog = React.forwardRef((inProps, ref) => {
const isMaximized = props.maximizable && maximized;

if (props.modal) {
const hasBlockScroll = document.primeDialogParams && document.primeDialogParams.some((param) => param.hasBlockScroll);
const hasBlockScroll = props.blockScroll || (document.primeDialogParams && document.primeDialogParams.some((param) => param.hasBlockScroll));

if (hasBlockScroll || isMaximized) {
DomHandler.removeClass(document.body, 'p-overflow-hidden');

0 comments on commit 9a73379

Please sign in to comment.