From: jeresig Date: Mon, 20 Sep 2010 14:16:36 +0000 (-0400) Subject: No need to set returnValue if preventDefault exists. Thanks kangax for the catch. X-Git-Tag: 1.4.3rc1~109 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=be59693037c4230e1b395e51a42c6fc55b577455;p=jquery.git No need to set returnValue if preventDefault exists. Thanks kangax for the catch. --- 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;