No need to set returnValue if preventDefault exists. Thanks kangax for the catch.
This commit is contained in:
parent
7350e2e1cc
commit
be59693037
1 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||||
|
} else {
|
||||||
e.returnValue = false;
|
e.returnValue = false;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
stopPropagation: function() {
|
stopPropagation: function() {
|
||||||
this.isPropagationStopped = returnTrue;
|
this.isPropagationStopped = returnTrue;
|
||||||
|
|
Loading…
Reference in a new issue