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

Add warnings for onFocusIn and onFocusOut props #6296

Merged
merged 1 commit into from Mar 24, 2016

Conversation

Projects
None yet
4 participants
@jontewks
Copy link
Contributor

commented Mar 19, 2016

Resolves #6275

@@ -187,6 +187,11 @@ function assertValidProps(component, props) {
'those nodes are unexpectedly modified or duplicated. This is ' +
'probably not intentional.'
);
warning(
props.onFocusIn == null && props.onFocusOut == null,
'Props onFocusIn and onFocusOut are no longer supported. Use onFocus and ' +

This comment has been minimized.

Copy link
@gaearon

gaearon Mar 19, 2016

Member

Nit: they were never supported in the first place.

This comment has been minimized.

Copy link
@jontewks

jontewks Mar 19, 2016

Author Contributor

Thanks @gaearon, updated!

@jontewks jontewks force-pushed the jontewks:add-warnings branch from e5df798 to 8648429 Mar 19, 2016

@facebook-github-bot

This comment has been minimized.

Copy link

commented Mar 19, 2016

@jontewks updated the pull request.

1 similar comment
@facebook-github-bot

This comment has been minimized.

Copy link

commented Mar 20, 2016

@jontewks updated the pull request.

props.onFocusIn == null &&
props.onFocusOut == null,
'Props onFocusIn and onFocusOut are not supported. Use onFocus and ' +
'onBlur events instead because they are normalized across browsers.'

This comment has been minimized.

Copy link
@jimfb

jimfb Mar 21, 2016

Contributor

Users can use onFocus in leu of onFocusIn because the React variant bubbles. We actually deviate from the standard here, so it's more than just "normalization across browsers".

Perhaps:

React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React.

This comment has been minimized.

Copy link
@jontewks

jontewks Mar 22, 2016

Author Contributor

Thanks for the clarification, I've updated the error message.

@jimfb

This comment has been minimized.

Copy link
Contributor

commented Mar 21, 2016

Seems fine to me, minor nit for the error message and then I think we can take this.

@jontewks jontewks force-pushed the jontewks:add-warnings branch from 8648429 to a7fae7e Mar 22, 2016

@jontewks

This comment has been minimized.

Copy link
Contributor Author

commented Mar 24, 2016

@jimfb let me know if anything else should be done for this one, thanks!

@jimfb jimfb merged commit 414f057 into facebook:master Mar 24, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jimfb

This comment has been minimized.

Copy link
Contributor

commented Mar 24, 2016

Looks good, thanks @jontewks!

@renovate renovate bot referenced this pull request Feb 2, 2018

Open

Update dependency react to v0.14.9 #29

0 of 1 task complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.