Skip to content

autoFocus related tweaks - #8779

Merged
bvaughn merged 3 commits into
react:masterfrom
bvaughn:focus-side-effect-sebmarkbage-feedback
Jan 13, 2017
Merged

bvaughn merged 3 commits into
react:masterfrom
bvaughn:focus-side-effect-sebmarkbage-feedback

Conversation

@bvaughn

@bvaughn bvaughn commented Jan 13, 2017 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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
Copy Markdown
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.

@sebmarkbage sebmarkbage left a comment

Copy link
Copy Markdown
Contributor

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 react: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