Commit a7dfbb55 authored by Brandon Aaron's avatar Brandon Aaron

Short-circuit jQuery.event.fix if it has already fixed the current event object.

parent b32ec31d
......@@ -263,11 +263,18 @@ jQuery.event = {
},
fix: function(event) {
// Short-circuit if the event has already been fixed by jQuery.event.fix
if ( event[ expando ] )
return event;
// store a copy of the original event object
// and clone to set read-only properties
var originalEvent = event;
event = jQuery.extend({}, originalEvent);
// Mark the event as fixed by jQuery.event.fix
event[ expando ] = true;
// add preventDefault and stopPropagation since
// they will not work on the clone
event.preventDefault = function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment