When navigating to a new route from within a modal, the browser window is no longer able to be scrolled.
To Reproduce
On a page large enough to scroll, create a Modal containing a link to another route. Navigate to the new route. The new view will not be scrollable. The only way around it seems to be to create a setTimeout that navigates to the new route after the modal exit animation has finished.
Expected behavior
The html styles should be removed before the Modal is unmounted.
Bug report
This issue has been reported before.
Describe the bug
When navigating to a new route from within a modal, the browser window is no longer able to be scrolled.
To Reproduce
On a page large enough to scroll, create a Modal containing a link to another route. Navigate to the new route. The new view will not be scrollable. The only way around it seems to be to create a setTimeout that navigates to the new route after the modal exit animation has finished.
Expected behavior
The html styles should be removed before the Modal is unmounted.
Example of issue
Stackblitz: https://stackblitz.com/edit/react-gzs6jw?file=src/Page1.js
System information