]> source.dussan.org Git - jquery-ui.git/commitdiff
Button: add explanatory comment for when we bind to blur
authorMike Sherov <mike.sherov@gmail.com>
Thu, 22 Nov 2012 00:58:59 +0000 (19:58 -0500)
committerMike Sherov <mike.sherov@gmail.com>
Thu, 22 Nov 2012 00:58:59 +0000 (19:58 -0500)
ui/jquery.ui.button.js

index b80fca4d9137da3b2b3e4e8ba308f1912569c82f..d6eed67dcc2f46e95214909ff5463731af6affbd 100644 (file)
@@ -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" );
                                });