Skip to content

onBlur event is triggered immediately after focusing on Input element #35080

@DeepAnchor

Description

@DeepAnchor

Reproduction link

Edit on CodeSandbox

Steps to reproduce

  1. Click on Input element
  2. Open dev console
  3. Observe that onBlur is triggered immediately after the onFocus event

What is expected?

onBlur event should not trigger after focusing on Input element.

What is actually happening?

onBlur event is triggered immediately after focusing on Input element.

Environment Info
antd 4.19.5
React 18.0.0
System MacOS 12.2.1
Browser 98.0.4758.109 (Official Build) (arm64)

Only happens with React 18, this was still working fine with React 17.0.2.
I know React 18 compatibility is still a work in progress for Antd v5, just thought I'd file this bug

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions