We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bfb12eb commit c78957eCopy full SHA for c78957e
packages/react-dom/src/client/ReactInputSelection.js
@@ -82,7 +82,9 @@ export function restoreSelection(priorSelectionInformation) {
82
}
83
84
85
- priorFocusedElem.focus();
+ if (typeof priorFocusedElem.focus === 'function') {
86
+ priorFocusedElem.focus();
87
+ }
88
89
for (let i = 0; i < ancestors.length; i++) {
90
const info = ancestors[i];
0 commit comments