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:
parent
a4c578adde
commit
dae376500b
1 changed files with 25 additions and 4 deletions
|
@ -543,6 +543,7 @@ Logic.registerPanel(P_CONTAINERS_LIST, {
|
|||
previousElement.focus();
|
||||
}
|
||||
}
|
||||
|
||||
switch (e.keyCode) {
|
||||
case 40:
|
||||
next();
|
||||
|
@ -550,6 +551,26 @@ Logic.registerPanel(P_CONTAINERS_LIST, {
|
|||
case 38:
|
||||
previous();
|
||||
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:
|
||||
if ((e.keyCode >= 49 && e.keyCode <= 57) &&
|
||||
Logic._currentPanel === "containersList") {
|
||||
|
|
Loading…
Add table
Reference in a new issue