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
Frezc opened this Issue Sep 18, 2018 · 7 comments

Comments

Projects
None yet
4 participants
@Frezc
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

This comment has been minimized.

Contributor

Frezc commented Sep 18, 2018

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

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

@Frezc

This comment has been minimized.

Contributor

Frezc commented Sep 18, 2018

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

@zombieJ

This comment has been minimized.

Member

zombieJ commented Sep 19, 2018

PR is welcomed : )

@IssuehuntBot

This comment has been minimized.

IssuehuntBot commented Oct 4, 2018

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

zombieJ added a commit to react-component/select that referenced this issue Oct 8, 2018

prevent focus blur event when click in multiple mode (#327)
* fix ant-design/ant-design#12281 prevent focus blur event when click in multiple mode

* update snapshot

* kill inline function

* add tests
@IssuehuntBot

This comment has been minimized.

IssuehuntBot commented Oct 9, 2018

@Frezc has started working. Visit this issue on Issuehunt

@IssuehuntBot

This comment has been minimized.

IssuehuntBot commented Oct 9, 2018

@IssuehuntBot

This comment has been minimized.

IssuehuntBot commented Oct 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment