No need to set returnValue if preventDefault exists. Thanks kangax for the catch.

This commit is contained in:
jeresig 2010-09-20 10:16:36 -04:00
parent 7350e2e1cc
commit be59693037

View File

@ -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)
} else {
e.returnValue = false;
}
},
stopPropagation: function() {
this.isPropagationStopped = returnTrue;