mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Merge pull request #597 from spicyj/gh-527
Don't use .returnValue if .defaultPrevented exists
This commit is contained in:
@@ -79,7 +79,10 @@ function SyntheticEvent(dispatchConfig, dispatchMarker, nativeEvent) {
|
||||
}
|
||||
}
|
||||
|
||||
if (nativeEvent.defaultPrevented || nativeEvent.returnValue === false) {
|
||||
var defaultPrevented = nativeEvent.defaultPrevented != null ?
|
||||
nativeEvent.defaultPrevented :
|
||||
nativeEvent.returnValue === false;
|
||||
if (defaultPrevented) {
|
||||
this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
|
||||
} else {
|
||||
this.isDefaultPrevented = emptyFunction.thatReturnsFalse;
|
||||
|
||||
Reference in New Issue
Block a user