From: Rick Waldron Date: Thu, 22 Sep 2011 15:30:03 +0000 (-0400) Subject: Shortcircuit fix if possible X-Git-Tag: 1.7b1~9^2~2^2~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=14cb04dc947cd9d01c97ec0c4dc487f2cd53c3ac;p=jquery.git Shortcircuit fix if possible --- diff --git a/src/event.js b/src/event.js index 38ed3ae91..fec3e6d49 100644 --- a/src/event.js +++ b/src/event.js @@ -492,6 +492,11 @@ jQuery.event = { event = jQuery.Event( originalEvent ); propHook = jQuery.event.propHooks[ event.type ]; + // Determine if an early return is possible + if ( !propHook && ( event.target && event.target.nodeType !== 3 ) && event.relatedTarget ) { + return event; + } + for ( var i = this.props.length, prop; i; ) { prop = this.props[ --i ]; event[ prop ] = originalEvent[ prop ];