Is there a workaround for the Android browser bug with CSS-Position and clickable areas?

前端 未结 3 660
傲寒
傲寒 2021-02-13 05:02

When you have some clickable content like , or and before this you have an absolutely positioned eleme

3条回答
  •  余生分开走
    2021-02-13 05:50

    Actually I've managed to avoid it by moving the objects below to let them be not visible. But in cases similar to yours the only workaround that actually works is to manage all the clicks in jquery (especially the ones on the background) and to bind/unbind the clicks events on needs. there are also some things that could help on some version/mobiles (but do not solve the problem)

    • the above item has background:rgba(0,0,0,0.1);
    • you should put a gif or png as background of the above element (as well as the background color as point 1)
    • using thouchstart instead of click as bind event sometimes helps.

    the actual version of android/browser are not affected with this bug (or at least it never happen to me) but it could be nice to know the affected versions. If someone has a list.

提交回复
热议问题