Skip to content

Commit

Permalink
Bug 372758 - Allow use of spacebar to activate all buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Li committed Feb 28, 2012
1 parent f8ef36d commit f9e76f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ define(['require', 'dojo', 'dijit', 'orion/util', 'orion/PageUtil', 'dijit/Menu'
});
// onClick events do not register for spans when using the keyboard
dojo.connect(domNode, "onkeypress", this, function(e) {
if (e.keyCode === dojo.keys.ENTER || e.keyCode === dojo.keys.SPACE) {
if (e.keyCode === dojo.keys.ENTER || e.charCode === dojo.keys.SPACE) {
// collect parameters in advance if specified
if (this.parameters && context.collectsParameters()) {
context.commandService._collectParameters(context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ define(['require', 'dojo', 'dijit', 'orion/commands', 'orion/util', 'dijit/Menu'
}));
// onClick events do not register for spans when using the keyboard without a screen reader
dojo.connect(close, "onkeypress", dojo.hitch(this, function (e) {
if(e.keyCode === dojo.keys.ENTER) {
if(e.keyCode === dojo.keys.ENTER || e.charCode === dojo.keys.SPACE) {
this.close(this._activeElements);
}
}));
Expand Down Expand Up @@ -231,7 +231,7 @@ define(['require', 'dojo', 'dijit', 'orion/commands', 'orion/util', 'dijit/Menu'
}));
// onClick events do not register for spans when using the keyboard without a screen reader
dojo.connect(options, "onkeypress", dojo.hitch(this, function (e) {
if(e.keyCode === dojo.keys.ENTER) {
if(e.keyCode === dojo.keys.ENTER || e.charCode === dojo.keys.SPACE) {
commandInvocation.parameters.optionsRequested = true;
finish(this);
}
Expand All @@ -249,7 +249,7 @@ define(['require', 'dojo', 'dijit', 'orion/commands', 'orion/util', 'dijit/Menu'
}));
// onClick events do not register for spans when using the keyboard without a screen reader
dojo.connect(ok, "onkeypress", dojo.hitch(this, function (e) {
if(e.keyCode === dojo.keys.ENTER) {
if(e.keyCode === dojo.keys.ENTER || e.charCode === dojo.keys.SPACE) {
finish(this);
}
}));
Expand All @@ -266,7 +266,7 @@ define(['require', 'dojo', 'dijit', 'orion/commands', 'orion/util', 'dijit/Menu'
}));
// onClick events do not register for spans when using the keyboard without a screen reader
dojo.connect(close, "onkeypress", dojo.hitch(this, function (e) {
if(e.keyCode === dojo.keys.ENTER) {
if(e.keyCode === dojo.keys.ENTER || e.charCode === dojo.keys.SPACE) {
localClose();
}
}));
Expand Down

0 comments on commit f9e76f3

Please sign in to comment.