Skip to content

Commit

Permalink
Fix #3166: Dialog remove blockScroll on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Aug 25, 2022
1 parent 354e1c7 commit da24807
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
Expand Up @@ -32,7 +32,6 @@ export const Dialog = React.forwardRef((props, ref) => {
const [bindDocumentDragEndListener, unbindDocumentDragEndListener] = useEventListener({ type: 'mouseup', target: () => window.document, listener: (event) => onDragEnd(event) });

const onClose = (event) => {
DomHandler.removeClass(document.body, 'p-overflow-hidden');
props.onHide();
event.preventDefault();
};
Expand Down Expand Up @@ -260,6 +259,7 @@ export const Dialog = React.forwardRef((props, ref) => {
const onExiting = () => {
if (props.modal) {
DomHandler.addClass(maskRef.current, 'p-component-overlay-leave');
DomHandler.removeClass(document.body, 'p-overflow-hidden');
}
};

Expand Down

0 comments on commit da24807

Please sign in to comment.