mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
Fix autoFocus for hydration content when it is mismatched
This commit is contained in:
1 parent
6c1fba539a
commit
69ed76d120
1 file changed
+7
-5
+7
-5
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user