Provide a mode where the overlay will prevent page scrolling. #109
Closed
dwjohnston
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
Hey @dwjohnston |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a reproduction of the problem here:
https://codesandbox.io/p/sandbox/goofy-swartz-v695zl?file=%2Fsrc%2Fexamples%2FWithOverlay.tsx%3A39%2C9
The problem here is when we open the floater - we can still scroll up and down, including having the overlay scroll over the sticky area.
What we really want is for the screen to 'freeze' until the floater is dismissed. This is how modals work in MUI for example, see:
https://mui.com/material-ui/react-modal/?srsltid=AfmBOoosHduoXZ2G5XAHE-xj-9Qi4dXckb4idY6ovYlQTDieLcVcINTs
It looks like they way they do it is by adding 'overflow: hidden' to the html element.
Beta Was this translation helpful? Give feedback.
All reactions