locomotive-scroll icon indicating copy to clipboard operation
locomotive-scroll copied to clipboard

Viewport height change in Chrome Android makes elements jump.

Open akshaykadambatt opened this issue 3 years ago • 3 comments

Hello 👋 On chrome android, on the first scroll the URL bar gets hidden and it changes the viewport height calculated by locomotive making the elements jump on the first scroll. (Same when scrolling back, making the URL bar appear again).

Steps to reproduce the behavior:

  1. Open a site in Chrome android (eg: https://vdo8m.csb.app/)
  2. Scroll once for the URL bar to hide.
  3. Elements with data-scroll jumps. (in the case of example, the button jumps)

Video: https://youtu.be/HqDuJsfGiU4

  • OS: Android 11
  • Browser Chrome 91

Thank you 👊

akshaykadambatt avatar Jun 27 '21 17:06 akshaykadambatt

Hello, any update?!

akshaykadambatt avatar Jul 20 '21 18:07 akshaykadambatt

That's not really a browser-related issue. This happens in any browser, you should default to the native scroll on mobile responsive sizes (smooth: false).

Iraklikandelaki avatar Aug 05 '21 10:08 Iraklikandelaki

But what if I want scroll based animations and smooth scroll in mobile?

akshaykadambatt avatar Oct 21 '21 11:10 akshaykadambatt