IOS 5 (safari) bug with HTML touch events on “position:fixed” div

前端 未结 7 2124
执念已碎
执念已碎 2021-02-05 22:32

I have a position:fixed div on a scrolling web page.

At first the event works, but when the page scroll, while the fixeed divs stays in place, its \"touch\" zone seems t

7条回答
  •  忘掉有多难
    2021-02-05 22:56

    I had this problem. The way I got round it was to bind to "click" instead of "touchstart".

    This meant that my "click" events got messed up (for users not on touch devices) so I detected a hover first and then used the hover to tell me if they were touch users or not. A bit dirty, but it works!

提交回复
热议问题