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

autoFocus related tweaks #8779

Merged

Conversation

bvaughn
Copy link
Contributor

@bvaughn bvaughn commented Jan 13, 2017

RE Sebastian's feedback on PR #8646

  • Improved a couple of Flow types
  • Replaced an unintentional Update effect on HostComponents with a Ref effect in complete phase
  • Removed an unnecessary check in ReactDOMFiber.commitMount as the result of the previous bullet

if (shouldAutoFocusHostComponent(type, newProps)) {
(domElement : any).focus();
}
((domElement : any) : HTMLInputElement).focus();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this could be HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes good catch.

Copy link
Collaborator

@sebmarkbage sebmarkbage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@bvaughn bvaughn force-pushed the focus-side-effect-sebmarkbage-feedback branch from 6f84969 to 2d17702 Compare January 13, 2017 23:25
@bvaughn bvaughn merged commit 7817eb0 into facebook:master Jan 13, 2017
@bvaughn bvaughn deleted the focus-side-effect-sebmarkbage-feedback branch January 13, 2017 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants