mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Fix an SVG focusing crash in IE11 (#12996)
* revert #11800 because #12763 * use try/catch for SVG in IE11 * use focusNode(element) when element.focus isn't a function. * revert #11800
This commit is contained in:
+3
-1
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user