Dialog: When using blockScroll and the dialog is unmounted while being visible, scrolling continues to be blocked #4938
Labels
Type: Bug
Issue contains a defect related to a specific component.
Milestone
Describe the bug
When using
blockScroll
in theDialog
component, and the dialog is unmounted whilst still being visible (e.g. navigating away using react-router), the scrolling of the main window remains blocked.Refer to codesandbox example.
Reproducer
https://codesandbox.io/s/primereact-test-forked-y9dsx2?file=/src/index.js
PrimeReact version
9.6.2
React version
18.x
Language
ALL
Build / Runtime
Create React App (CRA)
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
Scrolling of the main window is restored.
The text was updated successfully, but these errors were encountered: