Skip to content

Bug: event.type no longer matches the listener name for onFocus and onBlur #19560

@eps1lon

Description

@eps1lon

React version: 0.0.0-f77c7b9d7

Steps To Reproduce

  1. listen to onFocus
  2. read event.type

Link to code example:

https://codesandbox.io/s/eventtype-in-reactnext-gt71n?file=/src/Demo.js

The current behavior

event.type === 'focusin' for focus and focusout for blur.

The expected behavior

event.type is unaffected by changes to the native event React listens to. At least onMouseEnter works that way where you (sometimes?) have a mouseover native event but event.type will still read mouseover.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions