added right and left arrow shortcuts for container submenu tabs

change focus to whole panel element after right arrow press, allows navigation without pressing tab
This commit is contained in:
dnahol 2019-10-10 10:11:04 -07:00
parent a4c578adde
commit dae376500b

View file

@ -543,6 +543,7 @@ Logic.registerPanel(P_CONTAINERS_LIST, {
previousElement.focus(); previousElement.focus();
} }
} }
switch (e.keyCode) { switch (e.keyCode) {
case 40: case 40:
next(); next();
@ -550,6 +551,26 @@ Logic.registerPanel(P_CONTAINERS_LIST, {
case 38: case 38:
previous(); previous();
break; break;
case 39:
{
const showTabs = element.parentNode.querySelector(".show-tabs");
if(showTabs) {
showTabs.click();
}
const panel = document.querySelector("html");
if(panel) {
panel.focus();
}
break;
}
case 37:
{
const hideTabs = element.parentNode.querySelector(".panel-back-arrow");
if(hideTabs) {
hideTabs.click();
}
break;
}
default: default:
if ((e.keyCode >= 49 && e.keyCode <= 57) && if ((e.keyCode >= 49 && e.keyCode <= 57) &&
Logic._currentPanel === "containersList") { Logic._currentPanel === "containersList") {