willmcpo / body-scroll-lock

Body scroll locking that just works with everything 😏
MIT License
4.04k stars 337 forks source link

Keyboard scrolls away from body lock #94

Open fvonellerts opened 5 years ago

fvonellerts commented 5 years ago

On iPhone and other mobile devices, when the keyboard is opened on an <input> element inside the locked element, the element is scrolled upwards to make space for the keyboard.

When closing the keyboard again, the locked area keeps occupying only half the screen - with no way to scroll up.

timonweber commented 4 years ago

I have noticed similar issues. Maybe it would be enough to listen for resize events and then update the boundary metrics?

dattm97 commented 3 years ago

Issue still have in latest version. Any idea to fix it?

dattm97 commented 3 years ago

I have the same issue. I have no idea to fix it. @willmcpo Can you help me please?

aizigao commented 3 years ago

you can get real areaSize by window.visualViewport in ios13