identities list in container panel is now tabbable and buttons are accessible via enter key
This commit is contained in:
parent
27d51f89c7
commit
47cb585e2d
1 changed files with 6 additions and 4 deletions
|
@ -639,6 +639,7 @@ Logic.registerPanel(P_CONTAINERS_LIST, {
|
||||||
manage.classList.add("show-tabs", "pop-button");
|
manage.classList.add("show-tabs", "pop-button");
|
||||||
manage.setAttribute("title", `View ${identity.name} container`);
|
manage.setAttribute("title", `View ${identity.name} container`);
|
||||||
context.setAttribute("tabindex", "0");
|
context.setAttribute("tabindex", "0");
|
||||||
|
manage.setAttribute("tabindex", "0");
|
||||||
context.setAttribute("title", `Create ${identity.name} tab`);
|
context.setAttribute("title", `Create ${identity.name} tab`);
|
||||||
context.innerHTML = escaped`
|
context.innerHTML = escaped`
|
||||||
<div class="userContext-icon-wrapper open-newtab">
|
<div class="userContext-icon-wrapper open-newtab">
|
||||||
|
@ -660,7 +661,10 @@ Logic.registerPanel(P_CONTAINERS_LIST, {
|
||||||
}
|
}
|
||||||
|
|
||||||
Logic.addEnterHandler(tr, async (e) => {
|
Logic.addEnterHandler(tr, async (e) => {
|
||||||
if (e.target.matches(".open-newtab")
|
if (e.target.matches(".show-tabs") && hasTabs) {
|
||||||
|
Logic.showPanel(P_CONTAINER_INFO, identity);
|
||||||
|
}
|
||||||
|
else if (e.target.matches(".open-newtab")
|
||||||
|| e.target.parentNode.matches(".open-newtab")
|
|| e.target.parentNode.matches(".open-newtab")
|
||||||
|| e.type === "keydown") {
|
|| e.type === "keydown") {
|
||||||
try {
|
try {
|
||||||
|
@ -671,8 +675,6 @@ Logic.registerPanel(P_CONTAINERS_LIST, {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
window.close();
|
window.close();
|
||||||
}
|
}
|
||||||
} else if (hasTabs) {
|
|
||||||
Logic.showPanel(P_CONTAINER_INFO, identity);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1154,4 +1156,4 @@ window.addEventListener("resize", function () {
|
||||||
root.style.setProperty("--overflow-size", difference + "px");
|
root.style.setProperty("--overflow-size", difference + "px");
|
||||||
root.style.setProperty("--icon-fit", "12");
|
root.style.setProperty("--icon-fit", "12");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue