Skip to content

Commit

Permalink
No need to set returnValue if preventDefault exists. Thanks kangax fo…
Browse files Browse the repository at this point in the history
…r the catch.
  • Loading branch information
jeresig committed Sep 20, 2010
1 parent 7350e2e commit be59693
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/event.js
Expand Up @@ -583,9 +583,11 @@ jQuery.Event.prototype = {
// if preventDefault exists run it on the original event // if preventDefault exists run it on the original event
if ( e.preventDefault ) { if ( e.preventDefault ) {
e.preventDefault(); e.preventDefault();
}
// otherwise set the returnValue property of the original event to false (IE) // otherwise set the returnValue property of the original event to false (IE)
e.returnValue = false; } else {
e.returnValue = false;
}
}, },
stopPropagation: function() { stopPropagation: function() {
this.isPropagationStopped = returnTrue; this.isPropagationStopped = returnTrue;
Expand Down

0 comments on commit be59693

Please sign in to comment.