Creating a “sticky” fixed-position item that works on iOS Safari

后端 未结 5 1823
伪装坚强ぢ
伪装坚强ぢ 2020-12-08 08:40

On iOS safari, one-finger panning doesn’t generate any events until the user stops panning. An onscroll event is only generated when the page stops moving and redrawn.

5条回答
  •  独厮守ぢ
    2020-12-08 09:21

    I had a similar issue and bound handlers to touchstart/touchmove/touchend using jquery to detect the single finger scrolling and it worked perfectly. In my case I needed to move another element the same amount as the attempted move of another element and it updated nicely as the scroll was attempted so it ought to be suitable for your requirement.

提交回复
热议问题