From 14cb04dc947cd9d01c97ec0c4dc487f2cd53c3ac Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Thu, 22 Sep 2011 11:30:03 -0400 Subject: [PATCH] Shortcircuit fix if possible --- src/event.js | 5 +++++ 1 file changed, 5 insertions(+) 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 ]; -- 2.39.5