Back button with modal opened freeze the page scroll
See original GitHub issueI’m submitting a…
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
Current behavior
When you click a back button with the modal gallery opened, the page scroll freeze. This is happening due a attribute added to the body style=“overflow: hidden;” and changing the page this is not reset.
Expected behavior
The page scroll naturally as expected.
Minimal reproduction of the problem with instructions
Using the available project demo, open a modal gallery and then click the back button of the browser.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Prevent Page Scrolling When a Modal is Open | CSS-Tricks
If we know the top of the scroll location and add it to our CSS, then the body will not scroll back to...
Read more >Prevent BODY from scrolling when a modal is opened
Bootstrap's modal automatically adds the class modal-open to the body when a modal dialog is shown and removes it when the dialog is...
Read more >How to prevent Body from scrolling when a modal is opened ...
Given an HTML document with a modal, the task is to prevent the body element from scrolling whenever the modal is in an...
Read more >Stop the page from scrolling when a modal is open - Webflow
This is a quick guide on creating modals that stop the page from scrolling, after you've opened a modal. Closing the modal via...
Read more >Prototype scrolling with overflow behavior - Figma Help Center
Scroll up or down on a long page of content · Scroll left-to-right to view different elements in a slider. · Navigate between...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Perfect, many thanks @Ks89!
Issue confirmed. I’ll try to fix it this weekend