Skip to content
This repository has been archived by the owner on May 27, 2019. It is now read-only.

Commit

Permalink
Allow using left / right arrows to select buttons (#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
erayd authored and maximbaz committed Jul 25, 2018
1 parent 62bda2a commit 4b57674
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions chrome/script.browserify.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,16 @@ function keyHandler(e) {
case "ArrowDown":
switchFocus("div.entry:first-child > .login", "nextElementSibling");
break;
case "ArrowRight":
if (document.activeElement.nextElementSibling) {
document.activeElement.nextElementSibling.focus();
}
break;
case "ArrowLeft":
if (document.activeElement.previousElementSibling) {
document.activeElement.previousElementSibling.focus();
}
break;
case "c":
if (e.target.id != "search-field" && e.ctrlKey) {
document.activeElement.parentNode
Expand Down

0 comments on commit 4b57674

Please sign in to comment.