input的blur在点击确认按钮的bindtap之前触发

发布于 5 年前作者 pingpeng11149 次浏览最后编辑 5 年前来自 ask
<view class="pd-sm pl-md pr-md radius-15 flex-center" style="width:580rpx;border:1rpx solid #f4f6f8;">
   <input adjust-position="false" bindinput="toSetItem" bindfocus="focus"
     bindblur="blur" class="flex-1" type="text" value="{{tags}}" focus="{{showPopup}}" placeholder="请添加自定义标签"
     maxlength="16" />
   <view class="f-caption c-caption">{{tags.length > 16 ? 16 : tags.length}}/16</view>
</view>
<view class="flex-1 pd-lg" bindtap="toAddTag">确定</view>
点击确认按钮按理说应该执行toAddTag方法,但是执行了绑定的blur方法,catchtap也试过了,也不行
2 回复
fangshen
fangshen1 楼4 年前

点击按钮就失去了对input的焦点了,IOS和安卓有时候呈现方式好像不同,建议换一种写法

zoulei
zoulei2 楼3 个月前

这个问题时好时坏.相同源码.有时候可以有时候不可以