From: Mike Sherov Date: Thu, 22 Nov 2012 00:58:59 +0000 (-0500) Subject: Button: add explanatory comment for when we bind to blur X-Git-Tag: 1.10.0-beta.1~138 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=509259a66e28aad3f574fb77a06ceb201a271698;p=jquery-ui.git Button: add explanatory comment for when we bind to blur --- diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index b80fca4d9..d6eed67dc 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -193,6 +193,8 @@ $.widget( "ui.button", { $( 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() { $( this ).removeClass( "ui-state-active" ); });