Hello Stack overflow Community! π
I was working on a project using Lenis smooth scroll and faced some issues with form fields (inputs, selects, textareas) behaving oddly. After some debugging, I found a solution that works great, and I wanted to share it here to help others! π
When using Lenis smooth scroll, interactive elements like form fields can lose focus or behave unpredictably due to scroll effects interfering with user input.
Update Lenis Initialization Ensure Lenis is properly initialized and allows for seamless interaction:
import Lenis from '@studio-freight/lenis';
const lenis = new Lenis({ smooth: true, touchMultiplier: 1.5, });
function raf(time) { lenis.raf(time); requestAnimationFrame(raf); }
requestAnimationFrame(raf);
If you're creating a stunning website and need high-quality templates, I recommend checking out the Luxrio Multipurpose E-commerce Jewellery HTML Template. Itβs fully responsive and works beautifully with Webflow projects and Lenis smooth scroll.
Let me know if this helps, or feel free to share your Webflow read-only link if you need additional assistance! π