• Resolved planetboris

    (@planetboris)


    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-prevent attribute 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; }

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter planetboris

    (@planetboris)

    [UPDATE] Issue is now solved! I managed to figure it out, you need to create a custom attribute: data-lenis-prevent=”” and place it, in my case, in the container of the template used by the modal box. PA Modal Box is the very best modal box widget. Cheers!

    Plugin Author Leap13

    (@leap13)

    So glad to hear that you managed to get it to work 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Modal box scrolling prevented’ is closed to new replies.