From 7f31a92ede91d887c25174e8481e2f294f4cadc7 Mon Sep 17 00:00:00 2001 From: Maxx Crawford Date: Tue, 14 Jul 2020 16:49:49 -0500 Subject: [PATCH] Fixed #1810 - Split container item funcitonality --- src/css/popup.css | 8 ++++++-- src/js/popup.js | 52 +++++++++++++++++++++++++++++++++++++++-------- src/js/utils.js | 9 ++++++++ src/popup.html | 11 +++++----- 4 files changed, 65 insertions(+), 15 deletions(-) diff --git a/src/css/popup.css b/src/css/popup.css index f02c8bd..0d1553a 100644 --- a/src/css/popup.css +++ b/src/css/popup.css @@ -703,12 +703,16 @@ h3.title { color: #fff; } -.menu-text { +.menu-item-name { + display: flex; inline-size: calc(100% - 40px); - line-height: 24px; max-inline-size: 260px; } +.menu-text { + line-height: 24px; +} + .menu-icon { display: block; height: 16px; diff --git a/src/js/popup.js b/src/js/popup.js index 890b959..3cacdb4 100644 --- a/src/js/popup.js +++ b/src/js/popup.js @@ -403,6 +403,12 @@ const Logic = { if(element){ element.click(); } + + // If one Container is highlighted, + if (element.classList.contains("keyboard-right-arrow-override")) { + element.querySelector(".menu-right-float").click(); + } + break; } case 37: @@ -639,19 +645,21 @@ Logic.registerPanel(P_CONTAINERS_LIST, { Logic.identities().forEach(identity => { const tr = document.createElement("tr"); - tr.classList.add("menu-item", "hover-highlight", "keyboard-nav"); + tr.classList.add("menu-item", "hover-highlight", "keyboard-nav", "keyboard-right-arrow-override"); tr.setAttribute("tabindex", "0"); const td = document.createElement("td"); const openTabs = identity.numberOfOpenTabs || "" ; - td.innerHTML = Utils.escaped` -