@samitouri / QOS-React / commits / 4ac6f133af

Fallback to event.srcElement for IE9 (#12976)

It looks like we accidentally removed a fallback condition for the event target in IE9 when we dropped some support for IE8. This commit adds the event target specific support code back to getEventTarget.js Fixes #12506

Nathan Hunzaker committed Jun 11, 2018 at 09:35 UTC 4ac6f133aff78e7616c7427167f0d43a18441b94
1 file changed +3 -1
packages/react-dom/src/events/getEventTarget.js
+3 -1
@@ -15,7 +15,9 @@ import {TEXT_NODE} from '../shared/HTMLNodeType';
15 * @return {DOMEventTarget} Target node.
16 */
17 function getEventTarget(nativeEvent) {
18 - let target = nativeEvent.target || window;
18 + // Fallback to nativeEvent.srcElement for IE9
19 + // https://github.com/facebook/react/issues/12506
20 + let target = nativeEvent.target || nativeEvent.srcElement || window;
21
22 // Normalize SVG <use> element events #4963
23 if (target.correspondingUseElement) {