Closed gerlogu closed 9 months ago
When I open a popup (from Elementor in Wordpress) the scrollbar is not working while using the mouse wheel.
This is the code I'm using:
<script src="https://cdn.jsdelivr.net/gh/studio-freight/lenis@0.2.28/bundled/lenis.js"></script> <script> const lenis = new Lenis({ duration: 0.85, easing: (t) => Math.min(1, 1.001 - Math.pow(2, -10 * t)), // https://www.desmos.com/calculator/brs54l4xou direction: 'vertical', // vertical, horizontal gestureDirection: 'vertical', // vertical, horizontal, both smooth: true, mouseMultiplier: 1, smoothTouch: false, touchMultiplier: 2, infinite: false, }) lenis.on('scroll', ({ scroll, limit, velocity, direction, progress }) => { }) function raf(time) { lenis.raf(time) requestAnimationFrame(raf) } requestAnimationFrame(raf) </script>
https://codepen.io/ClementRoche/pen/PoLdjpw
Jums, it didn't solve my issue, the lenis is disabled, but the popup scrollbar still doesn't work :( Is there a way to make lenis just affect base website but not popups?
data-lenis-prevent
Fixed, thanks!!
When I open a popup (from Elementor in Wordpress) the scrollbar is not working while using the mouse wheel.
This is the code I'm using: