You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
React onFocus and onBlur events have switched to using the native focusin and focusout events under the hood, which more closely match React’s existing behavior and sometimes provide extra information.
Note though that you probably want to call .focus() instead of emulating events because the browser fires them in a specific order and it's always a risk to try to replicate it yourself because it might not match what the browser does.
React version: 17.0.0-rc.0
Steps To Reproduce
focus
/blur
events usingelement.dispatchEvent
onFocus
/onBlur
props are triggeredLink to code example: https://codesandbox.io/s/react-1700-rc0-dispatching-focusblur-events-pt6ih
The current behavior
onFocus
/onBlur
props aren't triggered.The expected behavior
onFocus
/onBlur
props to be triggered just like in React 16.13.1The text was updated successfully, but these errors were encountered: