Fix incorrect reference (#26)

Fixes #25.
This commit is contained in:
Erayd
2018-07-26 10:47:25 +12:00
committed by GitHub
parent f62ae7cc26
commit 686a4cd740

View File

@@ -205,7 +205,7 @@ function keyHandler(e) {
case "Tab": case "Tab":
var partElement = e.target.closest(".part"); var partElement = e.target.closest(".part");
var targetElement = e.shiftKey ? "previousElementSibling" : "nextElementSibling"; var targetElement = e.shiftKey ? "previousElementSibling" : "nextElementSibling";
if (partElement[targetElement] && e.target[targetElement].hasAttribute("tabindex")) { if (partElement[targetElement] && partElement[targetElement].hasAttribute("tabindex")) {
partElement[targetElement].focus(); partElement[targetElement].focus();
} else { } else {
document.querySelector(".part.search input[type=text]").focus(); document.querySelector(".part.search input[type=text]").focus();