Fix autoFocus for hydration content when it is mismatched

This commit is contained in:
Toru Kobayashi committed 2017-12-01 11:33:16 +09:00
1 parent 6c1fba539a
commit 69ed76d120
1 file changed
+7 -5
+7 -5
View File
@@ -700,11 +700,13 @@ const DOMRenderer = ReactFiberReconciler({
newProps: Props,
internalInstanceHandle: Object,
): void {
((domElement: any):
| HTMLButtonElement
| HTMLInputElement
| HTMLSelectElement
| HTMLTextAreaElement).focus();
if (shouldAutoFocusHostComponent(type, newProps)) {
((domElement: any):
| HTMLButtonElement
| HTMLInputElement
| HTMLSelectElement
| HTMLTextAreaElement).focus();
}
},
commitUpdate(