input组件自动失焦?
发布于 4 年前 作者 scao 12236 次浏览 来自 官方Issues

视频中,从第二个input跳到第三个input后,第三个input失焦,键盘闪烁后收起,需要再次点击才能聚焦。

3 回复

+1,我在项目中也遇到这个bug,在遍历渲染input框时出现

上一条帖子你删了吗?

// js 
  companyFocus(event) {
        console.log('输入框聚焦', event);
        this.setData({ companyFocus: true})
    },
    companyBlur(event) {
        console.log('输入框失去焦点', event);
    },

// wxml

<view class="options">

        <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依然失焦,键盘闪烁出现后消失

回到顶部