react native 安卓TextInput点击键盘上的search按钮触发两次的解决办法
2016-10-25 17:15
471 查看
<TextInput ref={component => this._textInput = component} onSubmitEditing={this._onSubmitEditing.bind(this)} onEndEditing={this._onPressSearch.bind(this)} returnKeyType='search' style={styles.inputText}/> _onSubmitEditing(){ this._textInput.blur(); } _onPressSearch(event){ console.log(event.nativeEvent.text); } 参考链接http://stackoverflow.com/questions/38710253/onsubmitediting-is-called-twice-when-keyboard-is-dismissed
相关文章推荐
- ionic开发——百度地图InfoWindow信息窗口上添加按钮,无法触发点击事件问题解决办法
- tableView中添加按钮触发不了点击事件的解决办法
- Java日记_17.9.01——点击按钮后,键盘监听失效的原因与解决办法
- C#.NET 中按钮点击一次刷新,第二次才会触发按钮事件解决办法
- 软键盘点击确定按钮循环调用两次的问题解决
- 动态创建添加按钮后,解决开始需要点击两次才能触发,之后点击一次就可以了
- ASP.NET中Button按钮,需点击两次,才能够页面跳转。原因与解决办法。
- asp.net 实现打开文件所在的文件夹, 本地可以打开,发布后点击按钮没有反应的解决办法
- append之后无法触发点击事件的解决办法
- Opera浏览器在输入法开启情况下无法触发键盘事件的解决办法——oninput事件
- IE下点击事件触发window.onbeforeunload 事件的解决办法
- VC++ 6.0点击打开文件按钮出错解决办法
- append之后无法触发点击事件的解决办法
- swfupload chrome 22.0.XXXXX dev版上传图片按钮点击无返应解决办法
- eclipse在新版本GTK(2.18) 上的一个bug--鼠标点击按钮无响应的解决办法
- 在IE中必须点击input file 控件的浏览按钮才能提交上传,否则没有权限 。js文件报拒绝访问,解决办法是将input file控件定位到你要点击的地方 ,并且input file做成透明的
- 关于表单提交按钮多次点击多次触发的解决方法
- asp.net 点击服务器按钮 不触发后台事件解决方法
- Opera浏览器在输入法开启情况下无法触发键盘事件的解决办法——轮询
- FCKEditor使用RequiredFieldValidator验证时必须点击两次的解决办法