微信小程序真机调试模式下ios的滑动监听异常
发布于 6 年前 作者 fang46 8530 次浏览 来自 官方Issues

微信小程序工具使用真机调试模式,在ios机器上的滑动监听事件(touchmove、scroll)滑动过程不会返回监听,当手机拿起来后(touchend),所有的滑动时间一下子一起返回(touchmove、scroll、touchend等),使用的是scroll-view组件采取的监听:

<scroll-view
  class="scroll"
  id="customCanvas"
  bindscrolltolower='scrolltolower'
  bindscrolltoupper='scrolltoupper'
  bindscroll='scroll'
  bindtouchstart="touchStart"
  bindtouchmove="touchmove"
  bindtouchend="touchend"
  bindtouchcancel="touchcancel"
   bindlongtap="longtap"
  scroll-top="{{scrolltop}}px"
  scroll-into-view="{{toView}}"
  binderror="error"
  scroll-y>
........
</scroll-view>

在预览模式下是可以正常监听到的。

1 回复

麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

回到顶部