Skip to content

Commit 509259a

Browse files
committed
Button: add explanatory comment for when we bind to blur
1 parent 70e0138 commit 509259a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ui/jquery.ui.button.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ $.widget( "ui.button", {
193193
$( this ).addClass( "ui-state-active" );
194194
}
195195
})
196+
// see #8559, we bind to blur here in case the button element loses
197+
// focus between keydown and keyup, it would be left in an "active" state
196198
.bind( "keyup" + this.eventNamespace + " blur" + this.eventNamespace, function() {
197199
$( this ).removeClass( "ui-state-active" );
198200
});

0 commit comments

Comments
 (0)