fix: Crashes when opening the overflow menu multiple times on macos, b=(closes #7718), c=no-component

This commit is contained in:
mr. m
2025-04-18 19:13:14 +02:00
parent ad0485d651
commit dab2646054

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs
index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..24dc9acd733ae401f8cdfb2351a7275d16ee46c8 100644 index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..1c5b80678fc3a4d17b0632a765b8182d88986bcc 100644
--- a/browser/components/customizableui/CustomizableUI.sys.mjs --- a/browser/components/customizableui/CustomizableUI.sys.mjs
+++ b/browser/components/customizableui/CustomizableUI.sys.mjs +++ b/browser/components/customizableui/CustomizableUI.sys.mjs
@@ -13,6 +13,7 @@ ChromeUtils.defineESModuleGetters(lazy, { @@ -13,6 +13,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
@@ -188,13 +188,12 @@ index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..24dc9acd733ae401f8cdfb2351a7275d
} }
child.removeAttribute("cui-anchorid"); child.removeAttribute("cui-anchorid");
child.removeAttribute("overflowedItem"); child.removeAttribute("overflowedItem");
@@ -7186,6 +7190,9 @@ class OverflowableToolbar { @@ -7369,7 +7373,7 @@ class OverflowableToolbar {
* @param {MouseEvent} aEvent the click event. break;
*/ }
#onClickDefaultListButton(aEvent) { case "mousedown": {
+ if (aEvent.view.gZenVerticalTabsManager._hasSetSingleToolbar && this.#toolbar.id == 'nav-bar') { - if (aEvent.button != 0) {
+ return; + if (aEvent.button != 0 || this.#toolbar.id == "zen-sidebar-top-buttons") { // Fix https://github.com/zen-browser/desktop/issues/7718
+ } break;
if (this.#defaultListButton.open) { }
this.#defaultListButton.open = false; if (aEvent.target == this.#defaultListButton) {
lazy.PanelMultiView.hidePopup(this.#defaultListPanel);