From 509259a66e28aad3f574fb77a06ceb201a271698 Mon Sep 17 00:00:00 2001 From: Mike Sherov Date: Wed, 21 Nov 2012 19:58:59 -0500 Subject: [PATCH] Button: add explanatory comment for when we bind to blur --- ui/jquery.ui.button.js | 2 ++ 1 file changed, 2 insertions(+) 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" ); }); -- 2.39.5