added keyboard nav to onboarding popups

This commit is contained in:
dnahol 2019-10-18 13:47:54 -07:00
parent 27d51f89c7
commit 2cddbefb63

View file

@ -382,6 +382,11 @@ const Logic = {
}
}
},
getCurrentPanel() {
const panelItem = this._panels[this._currentPanel];
return document.querySelector(this.getPanelSelector(panelItem));
},
};
// P_ONBOARDING_1: First page for Onboarding.
@ -550,6 +555,14 @@ Logic.registerPanel(P_CONTAINERS_LIST, {
case 38:
previous();
break;
case 13: {
const panel = Logic.getCurrentPanel();
const button = panel.getElementsByTagName("A")[0];
if(button) {
button.click();
}
break;
}
default:
if ((e.keyCode >= 49 && e.keyCode <= 57) &&
Logic._currentPanel === "containersList") {