From 89af291a75bb668e5c2ecb043ff537d685b2103b Mon Sep 17 00:00:00 2001 From: Hemakshi Sachdev Date: Fri, 21 Aug 2020 00:52:27 +0530 Subject: [PATCH] Fix: Unspecified error for IE11 (#19530) --- packages/react-dom/src/client/ReactDOMInput.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-dom/src/client/ReactDOMInput.js b/packages/react-dom/src/client/ReactDOMInput.js index 3bfdd8b01f643..c1afd277e3e93 100644 --- a/packages/react-dom/src/client/ReactDOMInput.js +++ b/packages/react-dom/src/client/ReactDOMInput.js @@ -16,6 +16,7 @@ import {getFiberCurrentPropsFromNode} from './ReactDOMComponentTree'; import {getToStringValue, toString} from './ToStringValue'; import {checkControlledValueProps} from '../shared/ReactControlledValuePropTypes'; import {updateValueIfChanged} from './inputValueTracking'; +import getActiveElement from './getActiveElement'; import {disableInputAttributeSyncing} from 'shared/ReactFeatureFlags'; import type {ToStringValue} from './ToStringValue'; @@ -412,7 +413,7 @@ export function setDefaultValue( if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js type !== 'number' || - node.ownerDocument.activeElement !== node + getActiveElement(node.ownerDocument) !== node ) { if (value == null) { node.defaultValue = toString(node._wrapperState.initialValue);