input组件自动失焦?
视频中,从第二个input跳到第三个input后,第三个input失焦,键盘闪烁后收起,需要再次点击才能聚焦。
视频中,从第二个input跳到第三个input后,第三个input失焦,键盘闪烁后收起,需要再次点击才能聚焦。
// js companyFocus(event) { console.log('输入框聚焦', event); this.setData({ companyFocus: true}) }, companyBlur(event) { console.log('输入框失去焦点', event); }, |
<text class="option-title" space="emsp">平 台:</text><text class="{{NotInput[0] ? '' : 'not-input'}}">*</text> <view class="input-box"> <input class="input-view" value="{{AccountInfo.Company}}" focus="{{companyFocus}}" confirm-hold bindinput="companyChange" bindfocus="companyFocus" bindblur="companyBlur" placeholder="请输入(必填)"/> </view> </view> |
使用时,即使特地用聚焦事件修改焦点为true,依然会发生input的失焦问题。
其中,confirm-hold 参数无效,input依然失焦,键盘闪烁出现后消失