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] Focus event always be triggered when click input box. #12281

Closed
1 task done
Frezc opened this issue Sep 18, 2018 · 7 comments · Fixed by react-component/select#327
Closed
1 task done

[Select] Focus event always be triggered when click input box. #12281

Frezc opened this issue Sep 18, 2018 · 7 comments · Fixed by react-component/select#327
Assignees

Comments

@Frezc
Copy link
Contributor

Frezc commented Sep 18, 2018

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

3.9.2

Environment

win10 chrome 68.0.3440.75

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Every time click the inputbox,the focus will be log

What is expected?

focus event shouldn't be triggered when click

What is actually happening?

Focus event always be triggered when click

@Frezc
Copy link
Contributor Author

Frezc commented Sep 18, 2018

我看了下这个问题,是因为input的宽度太短导致的,点到input外就会失去焦点了
image

不过看起来是select设计上就如此?如果是这样的话,onBlur和onFocus就会有没必要的触发,建议手动控制onFocus和onBlur的触发。

@Frezc
Copy link
Contributor Author

Frezc commented Sep 18, 2018

如果你们也认为这是一个bug的话,我可以提pr修复

@zombieJ
Copy link
Member

zombieJ commented Sep 19, 2018

PR is welcomed : )

@IssueHuntBot
Copy link

@BoostIO funded this issue with $10. Visit this issue on Issuehunt

zombieJ pushed a commit to react-component/select that referenced this issue Oct 8, 2018
* fix ant-design/ant-design#12281 prevent focus blur event when click in multiple mode

* update snapshot

* kill inline function

* add tests
@IssueHuntBot
Copy link

@Frezc has started working. Visit this issue on Issuehunt

@IssueHuntBot
Copy link

@Frezc has submitted output. Visit this issue on Issuehunt

@IssueHuntBot
Copy link

@afc163 has rewarded. Visit this issue on Issuehunt

ceriverso pushed a commit to ceriverso/select-component that referenced this issue Jun 12, 2022
* fix ant-design/ant-design#12281 prevent focus blur event when click in multiple mode

* update snapshot

* kill inline function

* add tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants