Skip to content
Permalink
Browse files

button: handle space "click"

  • Loading branch information
jzaefferer committed Jan 22, 2010
1 parent 967454c commit aa63c4b9594aed63ef43e5aa0ecad6fecd8f8d60
Showing with 8 additions and 0 deletions.
  1. +8 −0 ui/jquery.ui.button.js
@@ -137,6 +137,14 @@ $.widget( "ui.button", {
.bind( "keyup.button", function() {
$( this ).removeClass( "ui-state-active" );
});
if (this.buttonElement.is("a")) {
this.buttonElement.keyup(function(event) {
if (event.keyCode == $.ui.keyCode.SPACE) {
// TODO pass through original event correctly (just as 2nd argument doesn't work)
$(this).trigger("click");
}
})
}
}

this._resetButton();

0 comments on commit aa63c4b

Please sign in to comment.
You can’t perform that action at this time.