diff --git a/src/css/popup.css b/src/css/popup.css
index 052b9d4..8c15192 100644
--- a/src/css/popup.css
+++ b/src/css/popup.css
@@ -682,11 +682,6 @@ span ~ .panel-header-text {
opacity: 1;
}
-.container-info-tab-row:not(.clickable) .container-close-tab,
-.container-info-tab-row:not(.clickable):hover .container-close-tab {
- opacity: 0;
-}
-
.container-info-has-tabs,
.container-info-tab-row {
align-items: center;
diff --git a/src/img/container-close-tab.svg b/src/img/container-close-tab.svg
index a89606f..ad72e2a 100644
--- a/src/img/container-close-tab.svg
+++ b/src/img/container-close-tab.svg
@@ -1,10 +1,3 @@
-
-
-
+
\ No newline at end of file
diff --git a/src/js/popup.js b/src/js/popup.js
index 2decbf2..9ea0565 100644
--- a/src/js/popup.js
+++ b/src/js/popup.js
@@ -778,18 +778,15 @@ Logic.registerPanel(P_CONTAINER_INFO, {
tr.innerHTML = escaped`
|
${tab.title} |
-  | `;
+  | `;
tr.querySelector("td").appendChild(Utils.createFavIconElement(tab.favIconUrl));
document.getElementById("container-info-table").appendChild(fragment);
- const closeTab = document.querySelector("#close-tab");
- closeTab.setAttribute("id", tab.id);
-
- Logic.addEnterHandler(closeTab, async function(e) {
- await browser.tabs.remove(Number(e.target.id));
- window.close();
- });
+ const closeTab = document.getElementById(tab.id);
+ if(tab.hiddenState) {
+ closeTab.remove();
+ }
// On click, we activate this tab. But only if this tab is active.
if (!tab.hiddenState) {
@@ -798,6 +795,10 @@ Logic.registerPanel(P_CONTAINER_INFO, {
await browser.tabs.update(tab.id, {active: true});
window.close();
});
+ Logic.addEnterHandler(closeTab, async function(e) {
+ await browser.tabs.remove(Number(e.target.id));
+ window.close();
+ });
}
}
},