收藏
回答

TextArea间歇性无法触发ontouchstart,move,end方法

监听了上面三个方法,但是长按并滑动时有时不会触发。我在textarea外面加了一层加了Padding容器,然后长按住容器padding才能触发。。。求解决办法 。


wxml文件代码:

<view class="pic-container" style="background-image:url({{item.picPath}});" 

    >

    <textarea class="text" id="input" type="text" value="{{text}}" style="margin-top:{{y}}px;margin-left:{{x}}px;width:{{textWidth}}px;height:40px;" bindinput="onTextInput"

    bindblur="onBlur"

    bindfocus="onFocus"

      bindtouchstart="startp"

      bindtouchmove="movep"

      bindtouchend="endp"

      focus="{{focus}}"

      maxlength="{{maxlength}}"

      auto-height

      />

  </view>


wxss文件:

.pic-container{

    width:750rpx;

    height:750rpx;

    padding: 10px;

    border:1rpx solid;

    box-sizing:border-box;

    background-repeat:no-repeat;

    background-size:cover;

}

textarea{

    padding: 0;

    text-align: center;

}

.text{

    border:4rpx solid #45c01a;

    text-align:center;

    display:inline-block;

    font-size:40px;

    font-weight:normal;

}


回答关注问题邀请回答
收藏

2 个回答

  • kingofglory
    kingofglory
    2017-02-10

    模拟器上可以的,真机上不行。

    2017-02-10
    有用
    回复
  • kingofglory
    kingofglory
    2017-02-10

    本人QQ:1329408532

    2017-02-10
    有用
    回复
登录 后发表内容