Commit 9a69b2cf authored by lrbabe's avatar lrbabe Committed by John Resig

Cleanup bubbling focus and blur events

- Use cached event instead of jQuery.event
- Do not cache event.special if you use it only once
parent e03aee1a
......@@ -575,7 +575,6 @@ jQuery.each({
blur: "focusout"
}, function( orig, fix ){
var event = jQuery.event,
special = event.special,
handle = event.handle;
function ieHandler() {
......@@ -583,18 +582,18 @@ jQuery.each({
return handle.apply(this, arguments);
}
special[orig] = {
event.special[orig] = {
setup:function() {
if ( this.addEventListener )
this.addEventListener( orig, handle, true );
else
jQuery.event.add( this, fix, ieHandler );
event.add( this, fix, ieHandler );
},
teardown:function() {
if ( this.removeEventListener )
this.removeEventListener( orig, handle, true );
else
jQuery.event.remove( this, fix, ieHandler );
event.remove( this, fix, ieHandler );
}
};
});
......
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