Popup scrollbar not working while using mouse wheel
gerlogu opened this issue · comments
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>
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?
Fixed, thanks!!