Button: add explanatory comment for when we bind to blur

This commit is contained in:
Mike Sherov 2012-11-21 19:58:59 -05:00
parent 70e013830d
commit 509259a66e

View File

@ -193,6 +193,8 @@ $.widget( "ui.button", {
$( this ).addClass( "ui-state-active" ); $( this ).addClass( "ui-state-active" );
} }
}) })
// see #8559, we bind to blur here in case the button element loses
// focus between keydown and keyup, it would be left in an "active" state
.bind( "keyup" + this.eventNamespace + " blur" + this.eventNamespace, function() { .bind( "keyup" + this.eventNamespace + " blur" + this.eventNamespace, function() {
$( this ).removeClass( "ui-state-active" ); $( this ).removeClass( "ui-state-active" );
}); });