fix: Fixed background tabs opening when a tab is created by an addon, b=(no-bug), c=tabs, common, compact-mode

This commit is contained in:
Mr. M
2025-05-13 16:35:24 +02:00
parent 90876532b9
commit a9c344d385
4 changed files with 18 additions and 4 deletions

View File

@@ -1,8 +1,8 @@
diff --git a/browser/components/extensions/parent/ext-tabs.js b/browser/components/extensions/parent/ext-tabs.js
index b47f0510e32d788dfe7c3109474c4512c9900d4a..49697125a2998bbd50d87c54e2c5974baaf9a7e2 100644
index 517ea0079c12941a844a4f9e4ba694c6411887ee..510ab14dfa2178c332c9862d6a01b75bd12dfe3b 100644
--- a/browser/components/extensions/parent/ext-tabs.js
+++ b/browser/components/extensions/parent/ext-tabs.js
@@ -468,6 +468,7 @@ this.tabs = class extends ExtensionAPIPersistent {
@@ -482,6 +482,7 @@ this.tabs = class extends ExtensionAPIPersistent {
}
let tab = tabManager.getWrapper(event.originalTarget);
@@ -10,3 +10,11 @@ index b47f0510e32d788dfe7c3109474c4512c9900d4a..49697125a2998bbd50d87c54e2c5974b
let changeInfo = {};
for (let prop of needed) {
@@ -836,6 +837,7 @@ this.tabs = class extends ExtensionAPIPersistent {
});
}
+ window.gZenCompactModeManager._nextTimeWillBeActive = active;
let nativeTab = window.gBrowser.addTab(url, options);
if (active) {

View File

@@ -98,6 +98,10 @@
position: relative;
}
#identity-icon-box {
outline: none !important;
}
:root[zen-single-toolbar='true'] #urlbar:not([breakout-extend='true']) {
& #urlbar-input {
cursor: default;

View File

@@ -615,10 +615,12 @@ var gZenCompactModeManager = {
this.preference &&
!this.isSidebarPotentiallyOpen() &&
this._canShowBackgroundTabToast &&
!gZenGlanceManager._animating
!gZenGlanceManager._animating &&
!this._nextTimeWillBeActive
) {
gZenUIManager.showToast('zen-background-tab-opened-toast');
}
delete this._nextTimeWillBeActive;
},
};

View File

@@ -49,7 +49,7 @@ class ZenCommonUtils final : public nsIZenCommonUtils {
#if !defined(XP_MACOSX)
static auto PlayHapticFeedbackInternal() -> nsresult {
// No-op on non-macOS platforms
return NS_ERROR_NOT_IMPLEMENTED;
return NS_OK;
}
#else
static auto PlayHapticFeedbackInternal() -> nsresult;