Skip to content

Commit

Permalink
Make escape hide the popup if it's shown, regardless of where focus is
Browse files Browse the repository at this point in the history
Update the corresponding test to no longer expect a failure.

Fixes #860.
  • Loading branch information
zcorpan committed Mar 6, 2020
1 parent b65526d commit bbfe679
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions examples/combobox/js/grid-combo.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,16 @@ aria.GridCombobox.prototype.handleInputKeyDown = function (evt) {
);
}
else {
if (aria.Utils.hasClass(this.grid, 'hidden')) {
if (!this.shown) {
setTimeout((function () {
// On Firefox, input does not get cleared here unless wrapped in
// a setTimeout
this.input.value = '';
}).bind(this), 1);
}
else {
this.hideResults();
}
}
if (this.shown) {
this.hideResults();
}
return;
}
Expand Down
2 changes: 1 addition & 1 deletion test/tests/combobox_grid-combo.js
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ ariaTest('Test double escape key press with focus on combobox',


// This test fails due to bug: https://github.com/w3c/aria-practices/issues/860
ariaTest.failing('Test escape key press with focus on popup',
ariaTest('Test escape key press with focus on popup',
exampleFile, 'popup-key-escape', async (t) => {
t.plan(2);

Expand Down

0 comments on commit bbfe679

Please sign in to comment.