-
Notifications
You must be signed in to change notification settings - Fork 49.1k
Closed
Description
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
We have an onClick
handler on an SVG element. The handler sets a state property that causes the element to be hidden (via CSS). This makes IE11 throw on this line:
priorFocusedElem.focus(); |
It seems that #11800 removed a try/catch protection for this.
I am working around the problem by stubbing focus like this:
if (typeof SVGElement.prototype.focus === 'undefined') { SVGElement.prototype.focus = function () {}; }
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
Worked in 16.2.2