Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select中的onFocus事件没有执行 #3587

Closed
ptlinyi opened this issue Oct 25, 2016 · 7 comments · Fixed by react-component/select#124
Closed

Select中的onFocus事件没有执行 #3587

ptlinyi opened this issue Oct 25, 2016 · 7 comments · Fixed by react-component/select#124
Assignees

Comments

@ptlinyi
Copy link

ptlinyi commented Oct 25, 2016

发生问题的环境是:

  • antd 版本: 2.0
  • 操作系统及其版本: Mac OS Sierra
  • 浏览器及其版本:chrome 54.0

您做了什么?

引用antd的Select,设置onFocus事件

您期待的结果是:

执行onFocus事件

实际上的结果是:

没有执行onFocus事件

@ptlinyi
Copy link
Author

ptlinyi commented Oct 25, 2016

Select放在InputGroup中

@ptlinyi
Copy link
Author

ptlinyi commented Oct 25, 2016

onClick事件也没有执行
但onBlur事件有执行

@afc163
Copy link
Member

afc163 commented Oct 25, 2016

烦请提供一个可重现的演示,帮助我们更快的排查到问题。:smile:

http://codepen.io/benjycui/pen/KgPZrE?editors=001

@benjycui
Copy link
Contributor

因为 Select 本来就没有这两个事件啊。。

即使你不放在 InputGroup 里面都不会触发这两个事件,提 issue 就不能走点心。。

@afc163
Copy link
Member

afc163 commented Oct 26, 2016

需要补充 onFocus,和现有的 onBlur 对应。

@ptlinyi
Copy link
Author

ptlinyi commented Oct 26, 2016

https://ant.design/components/select/
那个搜索框的Demo里是有onFocus事件的,但实际执行没有,我没做什么特别的处理,直接拷的Demo的代码嵌到我的应用里的,你们要可重现的例子,直接用这个Demo,在onFocus时输出控制台应该就能看到没被执行了。

@lock
Copy link

lock bot commented May 3, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants