From be59693037c4230e1b395e51a42c6fc55b577455 Mon Sep 17 00:00:00 2001 From: jeresig Date: Mon, 20 Sep 2010 10:16:36 -0400 Subject: [PATCH] No need to set returnValue if preventDefault exists. Thanks kangax for the catch. --- src/event.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/event.js b/src/event.js index 5e72aaa..1fec18c 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; -- 1.7.10.4