mirror of
https://github.com/zen-browser/desktop.git
synced 2026-05-20 03:51:20 +00:00
no-bug: Dont recalculate urlbar overflow if its opened (gh-13571)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs
|
||||
index db617c65b89643015d91b0f6a20eab7d7a1b598f..896de41119f787594c30055e54eeac7662667f2c 100644
|
||||
index db617c65b89643015d91b0f6a20eab7d7a1b598f..53598363bfbc2c5de4c6b4de712d22d89ee6ce1d 100644
|
||||
--- a/browser/components/customizableui/CustomizableUI.sys.mjs
|
||||
+++ b/browser/components/customizableui/CustomizableUI.sys.mjs
|
||||
@@ -14,6 +14,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
||||
@@ -186,14 +186,15 @@ index db617c65b89643015d91b0f6a20eab7d7a1b598f..896de41119f787594c30055e54eeac76
|
||||
});
|
||||
|
||||
lazy.log.debug(
|
||||
@@ -7933,7 +7934,36 @@ class OverflowableToolbar {
|
||||
@@ -7933,7 +7934,37 @@ class OverflowableToolbar {
|
||||
Math.max(targetWidth, targetChildrenWidth)
|
||||
);
|
||||
totalAvailWidth = Math.ceil(totalAvailWidth);
|
||||
- let isOverflowing = targetContentWidth > totalAvailWidth;
|
||||
+ if (this.#target.id == 'nav-bar-customization-target' &&
|
||||
+ win.gZenVerticalTabsManager._hasSetSingleToolbar &&
|
||||
+ Services.prefs.getBoolPref("zen.view.overflow-webext-toolbar", true)) {
|
||||
+ Services.prefs.getBoolPref("zen.view.overflow-webext-toolbar", true) &&
|
||||
+ !win.gURLBar.hasAttribute("breakout-extend")) {
|
||||
+ const availSelectors = ":is(#page-action-buttons, #zen-copy-url-button, .unified-extensions-item)";
|
||||
+ const width = [
|
||||
+ ...win.gURLBar._inputContainer.querySelectorAll(availSelectors),
|
||||
@@ -224,7 +225,7 @@ index db617c65b89643015d91b0f6a20eab7d7a1b598f..896de41119f787594c30055e54eeac76
|
||||
return { isOverflowing, targetContentWidth, totalAvailWidth };
|
||||
}
|
||||
|
||||
@@ -7994,7 +8024,11 @@ class OverflowableToolbar {
|
||||
@@ -7994,7 +8025,11 @@ class OverflowableToolbar {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -237,7 +238,7 @@ index db617c65b89643015d91b0f6a20eab7d7a1b598f..896de41119f787594c30055e54eeac76
|
||||
lazy.log.debug(
|
||||
`Need ${minSize} but width is ${totalAvailWidth} so bailing`
|
||||
);
|
||||
@@ -8027,7 +8061,7 @@ class OverflowableToolbar {
|
||||
@@ -8027,7 +8062,7 @@ class OverflowableToolbar {
|
||||
}
|
||||
}
|
||||
if (!inserted) {
|
||||
@@ -246,7 +247,7 @@ index db617c65b89643015d91b0f6a20eab7d7a1b598f..896de41119f787594c30055e54eeac76
|
||||
}
|
||||
child.removeAttribute("cui-anchorid");
|
||||
child.removeAttribute("overflowedItem");
|
||||
@@ -8153,6 +8187,9 @@ class OverflowableToolbar {
|
||||
@@ -8153,6 +8188,9 @@ class OverflowableToolbar {
|
||||
* if no such list exists.
|
||||
*/
|
||||
get #webExtList() {
|
||||
@@ -256,7 +257,7 @@ index db617c65b89643015d91b0f6a20eab7d7a1b598f..896de41119f787594c30055e54eeac76
|
||||
if (!this.#webExtListRef) {
|
||||
let targetID = this.#toolbar.getAttribute("addon-webext-overflowtarget");
|
||||
if (!targetID) {
|
||||
@@ -8164,6 +8201,9 @@ class OverflowableToolbar {
|
||||
@@ -8164,6 +8202,9 @@ class OverflowableToolbar {
|
||||
let win = this.#toolbar.ownerGlobal;
|
||||
let { panel } = win.gUnifiedExtensions;
|
||||
this.#webExtListRef = panel.querySelector(`#${targetID}`);
|
||||
@@ -266,7 +267,7 @@ index db617c65b89643015d91b0f6a20eab7d7a1b598f..896de41119f787594c30055e54eeac76
|
||||
}
|
||||
return this.#webExtListRef;
|
||||
}
|
||||
@@ -8372,7 +8412,7 @@ class OverflowableToolbar {
|
||||
@@ -8372,7 +8413,7 @@ class OverflowableToolbar {
|
||||
break;
|
||||
}
|
||||
case "mousedown": {
|
||||
|
||||
Reference in New Issue
Block a user