aboutsummaryrefslogtreecommitdiffstats
path: root/src/event.js
diff options
context:
space:
mode:
authorjeresig <jeresig@gmail.com>2010-09-20 10:16:36 -0400
committerjeresig <jeresig@gmail.com>2010-09-20 10:16:36 -0400
commitbe59693037c4230e1b395e51a42c6fc55b577455 (patch)
tree8123bf6e8f57f58259fa43a144b89c3f8aed47e3 /src/event.js
parent7350e2e1cc671576804dab7cd82c739114146cb8 (diff)
downloadjquery-be59693037c4230e1b395e51a42c6fc55b577455.tar.gz
jquery-be59693037c4230e1b395e51a42c6fc55b577455.zip
No need to set returnValue if preventDefault exists. Thanks kangax for the catch.
Diffstat (limited to 'src/event.js')
-rw-r--r--src/event.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/event.js b/src/event.js
index 5e72aaaab..1fec18c8b 100644
--- a/src/event.js
+++ b/src/event.js
@@ -583,9 +583,11 @@ jQuery.Event.prototype = {
// if preventDefault exists run it on the original event
if ( e.preventDefault ) {
e.preventDefault();
- }
+
// otherwise set the returnValue property of the original event to false (IE)
- e.returnValue = false;
+ } else {
+ e.returnValue = false;
+ }
},
stopPropagation: function() {
this.isPropagationStopped = returnTrue;