aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2010-12-24 09:53:39 -0500
committerDave Methvin <dave.methvin@gmail.com>2010-12-24 09:53:39 -0500
commitc9e8a95709e12c6838a312850ce645e96a53ff5d (patch)
tree9f9e5118465ebf64a27065f95bd033a45b9534e6 /src
parent0b6afcedd22aaffb96d3d45b9b220a16229e2f7c (diff)
downloadjquery-c9e8a95709e12c6838a312850ce645e96a53ff5d.tar.gz
jquery-c9e8a95709e12c6838a312850ce645e96a53ff5d.zip
Simplify the check for isDefaultPrevented.
Diffstat (limited to 'src')
-rw-r--r--src/event.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/event.js b/src/event.js
index 80e2af66b..b61b11e64 100644
--- a/src/event.js
+++ b/src/event.js
@@ -602,10 +602,8 @@ jQuery.Event = function( src ) {
this.type = src.type;
// Events bubbling up the document may have been marked as prevented
// by a handler lower down the tree; reflect the correct value.
- this.isDefaultPrevented =
- (src.defaultPrevented===true ? true :
- src.getPreventDefault ? src.getPreventDefault() :
- src.returnValue===false) ? returnTrue : returnFalse;
+ this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false ||
+ src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse;
// Event type
} else {
this.type = src;