Skip to content

Commit

Permalink
Fallback to event.srcElement for IE9
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nhunzaker committed Jun 5, 2018
1 parent c5a733e commit 6066f49
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/react-dom/src/events/getEventTarget.js
Expand Up @@ -15,7 +15,9 @@ import {TEXT_NODE} from '../shared/HTMLNodeType';
* @return {DOMEventTarget} Target node.
*/
function getEventTarget(nativeEvent) {
let target = nativeEvent.target || window;
// Fallback to nativeEvent.srcElement for IE9
// https://github.com/facebook/react/issues/12506
let target = nativeEvent.target || nativeEvent.srcElement || window;

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

0 comments on commit 6066f49

Please sign in to comment.