Skip to content

Commit 89af291

Browse files
committed
Fix: Unspecified error for IE11 (#19530)
1 parent 23595ff commit 89af291

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/react-dom/src/client/ReactDOMInput.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {getFiberCurrentPropsFromNode} from './ReactDOMComponentTree';
1616
import {getToStringValue, toString} from './ToStringValue';
1717
import {checkControlledValueProps} from '../shared/ReactControlledValuePropTypes';
1818
import {updateValueIfChanged} from './inputValueTracking';
19+
import getActiveElement from './getActiveElement';
1920
import {disableInputAttributeSyncing} from 'shared/ReactFeatureFlags';
2021

2122
import type {ToStringValue} from './ToStringValue';
@@ -412,7 +413,7 @@ export function setDefaultValue(
412413
if (
413414
// Focused number inputs synchronize on blur. See ChangeEventPlugin.js
414415
type !== 'number' ||
415-
node.ownerDocument.activeElement !== node
416+
getActiveElement(node.ownerDocument) !== node
416417
) {
417418
if (value == null) {
418419
node.defaultValue = toString(node._wrapperState.initialValue);

0 commit comments

Comments
 (0)