darkroomengineering / lenis

How smooth scroll should be

Home Page:https://lenis.darkroom.engineering

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

data-lenis-prevent-touch made the toolbar minimised on iOS (used with swiper.js)

codyng opened this issue · comments

Describe the bug
data-lenis-prevent-touch made the toolbar minimised on iOS (used with swiper.js)

To Reproduce
If inserted a simple horizontal swiper (swiper.js) component normally, the Lenis scroll is fine but then we swiped the swiper horizontally, the page also is scrollable which is a bad UX.

I tried to apply "data-lenis-prevent-touch" data attribute to the swiper container as below:

<div class="swiper" data-lenis-prevent-touch>
    <div class="swiper-wrapper">
        <div class="swiper-slide">...</div>
        <div class="swiper-slide">...</div>
        <div class="swiper-slide">...</div>
        <div class="swiper-slide">...</div>
    </div>
</div>

It worked perfectly but when the div appeared in the page, the iOS toolbar automatically get minimised. The whole suddenly get "jumped" because of the recalculation of the height of the page and current scrolling position.

Expected behaviour
The toolbar won't be minimised even we apply data-lenis-prevent-touch.

can you provide a minimal reproduction link ?

I'm closing this until you provide a reproduction link