@samitouri / QOS-React-2 / commits / f912186012

Fix: Unspecified error for IE11 (#19530) (#19664)

Hemakshi Sachdev committed Aug 21, 2020 at 02:23 UTC f912186012f17858b9d25466c658a46e25093941
1 file changed +2 -1
packages/react-dom/src/client/ReactDOMInput.js
+2 -1
@@ -16,6 +16,7 @@ import {getFiberCurrentPropsFromNode} from './ReactDOMComponentTree';
16 import {getToStringValue, toString} from './ToStringValue';
17 import {checkControlledValueProps} from '../shared/ReactControlledValuePropTypes';
18 import {updateValueIfChanged} from './inputValueTracking';
19 +import getActiveElement from './getActiveElement';
20 import {disableInputAttributeSyncing} from 'shared/ReactFeatureFlags';
21
22 import type {ToStringValue} from './ToStringValue';
@@ -412,7 +413,7 @@ export function setDefaultValue(
413 if (
414 // Focused number inputs synchronize on blur. See ChangeEventPlugin.js
415 type !== 'number' ||
415 - node.ownerDocument.activeElement !== node
416 + getActiveElement(node.ownerDocument) !== node
417 ) {
418 if (value == null) {
419 node.defaultValue = toString(node._wrapperState.initialValue);