textarea使用touch事件,在手机上面不触发,希望得到解答,谢谢!
发布于 6 年前 作者 uyu 9671 次浏览 来自 问答

通过组件的touch事件,获取位置,从而达到移动组件的目的。

在开发者工具上面,可以运行;只是,在安卓手机上面,却不触发事件;bindtouchstart事件,也没有打印结果e;

将组件换成input,在手机上面,可以运行~

代码:

<textarea  type=“text” placeholder=“姓名” placeholder-style=“color:black;” style=“position:absolute;top:{{top==’’?0:top}}px;left:{{left==’’?0:left}}px;color:black;border:1px solid red;width:200rpx;height:100rpx;” bindtouchstart=“startA”  bindtouchmove=“moveA” bindtouchend=“endA” bindinput=“input” />

机型:

m3 node Flyme 6.0.2.0A

微信版本:

6.5.7

希望尽快得到解惑,谢谢!

回到顶部