iOS overflow: hidden inconsistency affecting Lenis modal setup #326
-
When using Lenis both on a page and inside a modal I’m experiencing issues on iOS where the modal scrolling breaks out of the modal due to the browser not consistently respecting the overflow: hidden property when set on the html. Most notably this happens in Safari when the address bar isn’t visible, which is the case after scrolling down. A workaround for this could be to utilize position: fixed instead of overflow: hidden on the html/body, which can be implemented for regular scrollable modals. I’m wondering whether there’s a similar workaround possible for Lenis? Up until now I haven’t been able to make Lenis function within the constraints of such a setup. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Figured it out, my modal was in need of some overscroll-behavior: contain. |
Beta Was this translation helpful? Give feedback.
Figured it out, my modal was in need of some overscroll-behavior: contain.