Skip to content
Permalink
Browse files

Move this.type setting to after prop set; avoid setting twice

  • Loading branch information...
rwaldron committed Apr 5, 2011
1 parent 23a411b commit b1b2e83394ef6ebcbaa5167d95e827f86655b74c
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/event.js
@@ -580,7 +580,6 @@ jQuery.Event = function( src ) {
// Event object
if ( src && src.type ) {
this.originalEvent = src;
this.type = src.type;

// Push explicitly provided properties onto the event object
for ( var prop in src ) {
@@ -591,6 +590,10 @@ jQuery.Event = function( src ) {
}
}

if ( !this.type ) {
this.type = src.type;
}

// Events bubbling up the document may have been marked as prevented
// by a handler lower down the tree; reflect the correct value.
this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false ||

0 comments on commit b1b2e83

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