Skip to content
Permalink
Browse files

Shortcircuit fix if possible

  • Loading branch information...
rwaldron committed Sep 22, 2011
1 parent dc878ae commit 14cb04dc947cd9d01c97ec0c4dc487f2cd53c3ac
Showing with 5 additions and 0 deletions.
  1. +5 −0 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 ];

0 comments on commit 14cb04d

Please sign in to comment.
You can’t perform that action at this time.