mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
fix: Crashes when opening the overflow menu multiple times on macos, b=(closes #7718), c=no-component
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 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..24dc9acd733ae401f8cdfb2351a7275d16ee46c8 100644
|
||||
index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..1c5b80678fc3a4d17b0632a765b8182d88986bcc 100644
|
||||
--- a/browser/components/customizableui/CustomizableUI.sys.mjs
|
||||
+++ b/browser/components/customizableui/CustomizableUI.sys.mjs
|
||||
@@ -13,6 +13,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
||||
@@ -188,13 +188,12 @@ index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..24dc9acd733ae401f8cdfb2351a7275d
|
||||
}
|
||||
child.removeAttribute("cui-anchorid");
|
||||
child.removeAttribute("overflowedItem");
|
||||
@@ -7186,6 +7190,9 @@ class OverflowableToolbar {
|
||||
* @param {MouseEvent} aEvent the click event.
|
||||
*/
|
||||
#onClickDefaultListButton(aEvent) {
|
||||
+ if (aEvent.view.gZenVerticalTabsManager._hasSetSingleToolbar && this.#toolbar.id == 'nav-bar') {
|
||||
+ return;
|
||||
+ }
|
||||
if (this.#defaultListButton.open) {
|
||||
this.#defaultListButton.open = false;
|
||||
lazy.PanelMultiView.hidePopup(this.#defaultListPanel);
|
||||
@@ -7369,7 +7373,7 @@ class OverflowableToolbar {
|
||||
break;
|
||||
}
|
||||
case "mousedown": {
|
||||
- if (aEvent.button != 0) {
|
||||
+ if (aEvent.button != 0 || this.#toolbar.id == "zen-sidebar-top-buttons") { // Fix https://github.com/zen-browser/desktop/issues/7718
|
||||
break;
|
||||
}
|
||||
if (aEvent.target == this.#defaultListButton) {
|
||||
|
Reference in New Issue
Block a user