Modal box scrolling prevented
-
Hi, the scrolling is prevented in my modal box popops. I know the reason why. It is because I am using the Lenis Smooth Scroll Library I have tested with and without and the scrolling functions normally without the Lenis Library installed. The developer has given an attribute that we can apply to prevent the library from functioning for a given element. I’m not sure if the ID or class necessary to apply is “premium-modal-box-modal“? How can I implement this attribute, with an HTML widget? CSS is better? Hope you have a solution, thank you and best regards. From their docs:
Use
data-lenis-preventattribute on nested scroll elements.<div data-lenis-prevent>scroll content</div>
or data-lenis-prevent-wheel
or data-lenis-prevent-touch
Recommended CSS:
html.lenis { height: auto; } .lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }
The topic ‘Modal box scrolling prevented’ is closed to new replies.