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

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

Closed
eps1lon opened this issue Aug 7, 2020 · 1 comment · Fixed by #19561
Closed

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

eps1lon opened this issue Aug 7, 2020 · 1 comment · Fixed by #19561

Comments

@eps1lon
Copy link
Collaborator

eps1lon commented Aug 7, 2020

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.

@eps1lon eps1lon added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Aug 7, 2020
@gaearon
Copy link
Collaborator

gaearon commented Aug 8, 2020

If you'd like to send a fix we'll take it! Otherwise I'll look on Monday.

@gaearon gaearon added Component: DOM Type: Bug and removed Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug labels Aug 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants