Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chrome Android 66 innerHeight doesn't change after swipe #1171

Closed
joeytrout opened this issue May 9, 2018 · 2 comments
Closed

Chrome Android 66 innerHeight doesn't change after swipe #1171

joeytrout opened this issue May 9, 2018 · 2 comments

Comments

@joeytrout
Copy link

The window.innerHeight value changes when the URL Bar at the top is visible and hidden. But after swiping, it is locked. This bug only happens on Chrome Android. I've created a element with position:fixed, top:0, bottom:0, border:solid 10px red.

  • The screenshots show what it looks like before swiping with URL Bar visible and hidden. The fixed element on the right adapts to the height.
  • After swiping, the fixed element is locked to the height that it is in at the time of swiping. The third screenshot shows what happens when the URL Bar is visible when swiping happens, then it is hidden after scrolling.
  • Also, the tap position is also about 1 cm off when this happens, ie. if there is a link there, you need to tap about 1cm higher to click on it.
  • The code is here but you will need to be in from a html file on Chrome android: https://jsfiddle.net/yoenf6mw/

hammer

@robozevel
Copy link

robozevel commented Jul 4, 2018

Seems to be triggered when touch-action is set to pan-y in Chrome for Android, which hammer.js does by default. Set it to auto when initializing to workaround it. There's an open Chromium issue

new Hammer(myElement, { touchAction: 'auto' })

@joeytrout
Copy link
Author

Amazing. Thanks for helping out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants