Commit c9e8a957 authored by Dave Methvin's avatar Dave Methvin

Simplify the check for isDefaultPrevented.

parent 0b6afced
...@@ -602,10 +602,8 @@ jQuery.Event = function( src ) { ...@@ -602,10 +602,8 @@ jQuery.Event = function( src ) {
this.type = src.type; this.type = src.type;
// Events bubbling up the document may have been marked as prevented // Events bubbling up the document may have been marked as prevented
// by a handler lower down the tree; reflect the correct value. // by a handler lower down the tree; reflect the correct value.
this.isDefaultPrevented = this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false ||
(src.defaultPrevented===true ? true : src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse;
src.getPreventDefault ? src.getPreventDefault() :
src.returnValue===false) ? returnTrue : returnFalse;
// Event type // Event type
} else { } else {
this.type = src; this.type = src;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment