File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
packages/react-dom/src/events Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ if (ExecutionEnvironment.canUseDOM) {
135
135
function startWatchingForValueChange ( target , targetInst ) {
136
136
activeElement = target ;
137
137
activeElementInst = targetInst ;
138
- activeElement . attachEvent ( 'onpropertychange' , handlePropertyChange ) ;
138
+ activeElement . addEventListener ( 'onpropertychange' , handlePropertyChange ) ;
139
139
}
140
140
141
141
/**
@@ -146,7 +146,7 @@ function stopWatchingForValueChange() {
146
146
if ( ! activeElement ) {
147
147
return ;
148
148
}
149
- activeElement . detachEvent ( 'onpropertychange' , handlePropertyChange ) ;
149
+ activeElement . removeEventListener ( 'onpropertychange' , handlePropertyChange ) ;
150
150
activeElement = null ;
151
151
activeElementInst = null ;
152
152
}
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import {TEXT_NODE} from '../shared/HTMLNodeType';
17
17
function getEventTarget ( nativeEvent ) {
18
18
// Fallback to nativeEvent.srcElement for IE9
19
19
// https://github.com/facebook/react/issues/12506
20
- let target = nativeEvent . target || nativeEvent . srcElement || window ;
20
+ let target = nativeEvent . target || window ;
21
21
22
22
// Normalize SVG <use> element events #4963
23
23
if ( target . correspondingUseElement ) {
You can’t perform that action at this time.
0 commit comments