aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.button.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/jquery.ui.button.js')
-rw-r--r--ui/jquery.ui.button.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js
index 8e016cb39..d69e912ff 100644
--- a/ui/jquery.ui.button.js
+++ b/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();