html52.com
我爱小程序-开发者交流社区

IOS上 canvas无法取得longtap事件

问题模块 框架类型 问题类型 终端类型 微信版本 基础库版本
框架 小程序 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);

  }


评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付