mirror of
https://github.com/zen-browser/desktop.git
synced 2025-07-08 12:59:58 +02:00
49 lines
2 KiB
C++
49 lines
2 KiB
C++
diff --git a/browser/components/tabbrowser/content/tab.js b/browser/components/tabbrowser/content/tab.js
|
|
index d41c486c02a6f09dcff5741a59ad8b617294c481..544ca38934d9b0fe0722082c71ee58f148c2cc90 100644
|
|
--- a/browser/components/tabbrowser/content/tab.js
|
|
+++ b/browser/components/tabbrowser/content/tab.js
|
|
@@ -37,6 +37,7 @@
|
|
</hbox>
|
|
</vbox>
|
|
<image class="tab-close-button close-icon" role="button" data-l10n-id="tabbrowser-close-tabs-button" data-l10n-args='{"tabCount": 1}' keyNav="false"/>
|
|
+ <image class="tab-reset-button reset-icon" role="button" data-l10n-id="tabbrowser-reset-tabs-button" data-l10n-args='{"tabCount": 1}' keyNav="false"/>
|
|
</hbox>
|
|
</stack>
|
|
`;
|
|
@@ -168,7 +169,7 @@
|
|
}
|
|
|
|
set _visuallySelected(val) {
|
|
- if (val == this.hasAttribute("visuallyselected")) {
|
|
+ if (val == this.hasAttribute("visuallyselected") || (!val && this.linkedBrowser?.closest('.browserSidebarContainer').classList.contains('zen-glance-background'))) {
|
|
return;
|
|
}
|
|
|
|
@@ -451,6 +452,7 @@
|
|
this.style.MozUserFocus = "ignore";
|
|
} else if (
|
|
event.target.classList.contains("tab-close-button") ||
|
|
+ event.target.classList.contains("tab-reset-button") ||
|
|
event.target.classList.contains("tab-icon-overlay")
|
|
) {
|
|
eventMaySelectTab = false;
|
|
@@ -544,6 +546,7 @@
|
|
if (this.multiselected) {
|
|
gBrowser.removeMultiSelectedTabs();
|
|
} else {
|
|
+ gZenPinnedTabManager._removePinnedAttributes(this.contextTab, true);
|
|
gBrowser.removeTab(this, {
|
|
animate: true,
|
|
triggeringEvent: event,
|
|
@@ -553,6 +556,11 @@
|
|
// (see tabbrowser-tabs 'click' handler).
|
|
gBrowser.tabContainer._blockDblClick = true;
|
|
}
|
|
+
|
|
+ if (event.target.classList.contains("tab-reset-button")) {
|
|
+ gZenPinnedTabManager._onCloseTabShortcut(event, this, 'unload-switch');
|
|
+ gBrowser.tabContainer._blockDblClick = true;
|
|
+ }
|
|
}
|
|
|
|
on_dblclick(event) {
|