Android Chrome browser address bar shifts fixed element hitareas

牧云@^-^@ 提交于 2019-11-29 13:32:20

问题


It seems Android Chrome has a pretty major bug where sometimes the address bar hiding/showing causes fixed elements to shift their bounding box down/up by the browsers address bar height. So the elements visually stay in the same spot, however the bounding box actually shifts. This renders clickable areas useless as they don't register anymore (see images below).

The bug is intermittent, but I've been able to replicate it pretty reliably by scrolling quickly and then abruptly stopping the scroll the touching the screen. Has anyone else encountered this and more importantly, does anyone have a solution that avoids this behaviour?

In the first image, notice there is no address bar. Hidden by scrolling down. Bounding box is where it should be.

Now with the address bar it shifts the entire bounding box down, out of view in this case. This renders the hit area of buttons useless.

来源:https://stackoverflow.com/questions/50938106/android-chrome-browser-address-bar-shifts-fixed-element-hitareas

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!