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:
Jifa Jiang
2018-06-11 03:39:29 +01:00
committed by Dan Abramov
parent bfb12ebb52
commit c78957eac8
+3 -1
View File
@@ -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];