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

Commit 4b57674

Browse files
eraydmax-baz
authored andcommitted
Allow using left / right arrows to select buttons (#279)
1 parent 62bda2a commit 4b57674

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

chrome/script.browserify.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,16 @@ function keyHandler(e) {
359359
case "ArrowDown":
360360
switchFocus("div.entry:first-child > .login", "nextElementSibling");
361361
break;
362+
case "ArrowRight":
363+
if (document.activeElement.nextElementSibling) {
364+
document.activeElement.nextElementSibling.focus();
365+
}
366+
break;
367+
case "ArrowLeft":
368+
if (document.activeElement.previousElementSibling) {
369+
document.activeElement.previousElementSibling.focus();
370+
}
371+
break;
362372
case "c":
363373
if (e.target.id != "search-field" && e.ctrlKey) {
364374
document.activeElement.parentNode

0 commit comments

Comments
 (0)