mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Shortcircuit fix if possible
This commit is contained in:
parent
dc878ae33b
commit
14cb04dc94
@ -492,6 +492,11 @@ jQuery.event = {
|
|||||||
event = jQuery.Event( originalEvent );
|
event = jQuery.Event( originalEvent );
|
||||||
propHook = jQuery.event.propHooks[ event.type ];
|
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; ) {
|
for ( var i = this.props.length, prop; i; ) {
|
||||||
prop = this.props[ --i ];
|
prop = this.props[ --i ];
|
||||||
event[ prop ] = originalEvent[ prop ];
|
event[ prop ] = originalEvent[ prop ];
|
||||||
|
Loading…
Reference in New Issue
Block a user