键盘input切换焦点导致软键盘一收一起一上一下
- 当前 Bug 的表现(可附上截图) 点击view1,获取input焦点,拉起键盘,再次点击view1,键盘收起再上来 - 预期表现 再次点击保持不收起 - 复现路径 - 提供一个最简复现 Demo [代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"container"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]input[代码] [代码]class[代码][代码]=[代码][代码]'one'[代码][代码]/>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]bindtap[代码][代码]=[代码][代码]'dianji'[代码] [代码]class[代码][代码]=[代码][代码]'view1'[代码][代码]>111111</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]input[代码] [代码]class[代码][代码]=[代码][代码]'two'[代码] [代码]focus[代码][代码]=[代码][代码]'{{oneinput}}'[代码][代码]/>[代码][代码]</[代码][代码]view[代码][代码]>[代码][代码]const app = getApp()[代码] [代码]Page({[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* 页面的初始数据[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]data: {[代码][代码] [代码] [代码] [代码][代码]oneinput: false[代码][代码] [代码][代码]},[代码][代码] [代码][代码]dianji:function(){[代码][代码] [代码][代码]this.setData({[代码][代码] [代码][代码]oneinput: true[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码]})[代码]