diff --git a/packages/react-dom/src/client/ReactInputSelection.js b/packages/react-dom/src/client/ReactInputSelection.js index d4b47b992ce8..3eda61571044 100644 --- a/packages/react-dom/src/client/ReactInputSelection.js +++ b/packages/react-dom/src/client/ReactInputSelection.js @@ -82,7 +82,9 @@ export function restoreSelection(priorSelectionInformation) { } } - priorFocusedElem.focus(); + if (typeof priorFocusedElem.focus === 'function') { + priorFocusedElem.focus(); + } for (let i = 0; i < ancestors.length; i++) { const info = ancestors[i];