input组件 bindfocus 真机上连续调用两次,且反应很慢

发布于 7 年前作者 xiayan2095 次浏览最后编辑 7 年前来自 ask
  • 当前 Bug 的表现(可附上截图)

  • 预期表现

  • 复现路径

  • 提供一个最简复现 Demo

<input type=“search” bindfocus=“search” class=“search” focus=“{{focus}}”></input>

search(){

console.log(‘focus’)

wx.navigateTo({

url: ‘/pages/product/search/search?type=1’,

})

this.setData({

focus: false

})

},

2 回复
kshen
kshen1 楼6 年前

请具体描述问题。请提供一下出现问题的机型和微信版本,以及能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

yongxiao
yongxiao2 楼5 年前

https://developers.weixin.qq.com/s/aRH6mum17Q6l

机型vivo,Android 8.1.0,android微信版本7.0.3,bindfocus事件会触发两次,导致页面跳转两次