React: Please add events onFocusIn & OnFocusOut

Created on 18 Oct 2015  Â·  5Comments  Â·  Source: facebook/react

Most helpful comment

As discussed in #6226 and as @mxstbr noted above, adding them explicitly probably wasn’t the right call after all.

We already support onFocus and onBlur in a cross-browser way, and we should tell people to use them instead. Internally they already use focusin and focusout on IE which implements the bubbling behavior.

We should probably consider adding a warning that tells you to use onFocus if you attempt to define onFocusIn.

All 5 comments

@jimfb this might be something I could look into! What about adding focusIn and focusOut to the SimpleEventsPlugin next to focus?

I haven't looked at it, but that sounds reasonable to me.

These two are added for IE support of onFocus and onBlur – should I still add them as seperate events or is it fine as-is? https://github.com/facebook/react/blob/master/src/renderers/dom/client/ReactBrowserEventEmitter.js#L297-L310

As discussed in #6226 and as @mxstbr noted above, adding them explicitly probably wasn’t the right call after all.

We already support onFocus and onBlur in a cross-browser way, and we should tell people to use them instead. Internally they already use focusin and focusout on IE which implements the bubbling behavior.

We should probably consider adding a warning that tells you to use onFocus if you attempt to define onFocusIn.

Was this page helpful?
0 / 5 - 0 ratings