aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRick Waldron <waldron.rick@gmail.com>2011-09-22 11:30:03 -0400
committerRick Waldron <waldron.rick@gmail.com>2011-09-22 11:30:03 -0400
commit14cb04dc947cd9d01c97ec0c4dc487f2cd53c3ac (patch)
tree9340032c876987db2374b0c2f314d844b2c5eb0f
parentdc878ae33bfe44a746d1f24eca7033f80d32517c (diff)
downloadjquery-14cb04dc947cd9d01c97ec0c4dc487f2cd53c3ac.tar.gz
jquery-14cb04dc947cd9d01c97ec0c4dc487f2cd53c3ac.zip
Shortcircuit fix if possible
-rw-r--r--src/event.js5
1 files changed, 5 insertions, 0 deletions
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 ];