Skip to content

Commit 4ac6f13

Browse files
nhunzakergaearon
authored andcommitted
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
1 parent 23be410 commit 4ac6f13

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/react-dom/src/events/getEventTarget.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ import {TEXT_NODE} from '../shared/HTMLNodeType';
1515
* @return {DOMEventTarget} Target node.
1616
*/
1717
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;
1921

2022
// Normalize SVG <use> element events #4963
2123
if (target.correspondingUseElement) {

0 commit comments

Comments
 (0)