问题模块 | 框架类型 | 问题类型 | 终端类型 | 微信版本 | 基础库版本 |
---|---|---|---|---|---|
框架 | 小程序 | Bug | 客户端 | 6.6.7 | 2.2.5 |
昨天在一个朋友的IOS手机上测试发布的小程序时,发现IOS下, 由
cover-view
组件覆盖的canvas,始终无法触发canvas 绑定的longtap事件,而在所有安卓手机上正常 布局文件:
<view>
<!-- canvas.wxml -->
<canvas style="width: 100vh; height:100vh;"
canvas-id="MainView"
disable-scroll='true'
bindtouchstart="touchstart"
bindtouchmove="touchmove"
bindtouchend="touchend"
bindlongtap="longtap">
<cover-image class="shareImg" bindtap="Exit" src='./image/exit1.png'></cover-image>
<cover-view class="share">
<!--cover-image open-type="share" src="./image/defaultIcon.png"/-->
<!--cover-image class="shareImg" src='./image/addFriends.png'></cover-image-->
<button class='shareButton' open-type='share'>邀请好友</button>
</cover-view>
</canvas>
</view> --------------------------------------------------------------------------------------------------------------------------------- wxs:
/**用户手指触摸i */
touchstart:function(e){
board.touchstart(e);//传递触摸事件
},
touchmove:function(e){
board.touchmove(e);
},
touchend:function(e){
board.touchend(e);
},
longtap:function(e){
board.longtap(e);
}