diff --git a/browser/base/content/browser-addons.js b/browser/base/content/browser-addons.js index d7542a38a0242dd9c9c6390171d59992d75a0c19..baa5d84c26f7e74c779bc7e1a2b83b543b413441 100644 --- a/browser/base/content/browser-addons.js +++ b/browser/base/content/browser-addons.js @@ -1064,7 +1064,7 @@ var gXPInstallObserver = { persistent: true, hideClose: true, popupOptions: { - position: "bottomright topright", + position: gZenUIManager.panelUIPosition, }, }; @@ -1273,7 +1273,7 @@ var gXPInstallObserver = { hideClose: true, timeout: Date.now() + 30000, popupOptions: { - position: "bottomright topright", + position: gZenUIManager.panelUIPosition, }, }; @@ -2205,7 +2205,7 @@ var gUnifiedExtensions = { // If the new ID is not added in NOTIFICATION_IDS, consider handling the case // in the "PopupNotificationsBeforeAnchor" handler elsewhere in this file. getPopupAnchorID(aBrowser, aWindow) { - const anchorID = "unified-extensions-button"; + const anchorID = "zen-site-data-icon-button"; const attr = anchorID + "popupnotificationanchor"; if (!aBrowser[attr]) { @@ -2216,7 +2216,7 @@ var gUnifiedExtensions = { anchorID // Anchor on the toolbar icon to position the popup right below the // button. - ).firstElementChild; + ); } return anchorID; @@ -2509,11 +2509,7 @@ var gUnifiedExtensions = { // Lazy load the unified-extensions-panel panel the first time we need to // display it. if (!this._panel) { - let template = document.getElementById( - "unified-extensions-panel-template" - ); - template.replaceWith(template.content); - this._panel = document.getElementById("unified-extensions-panel"); + this._panel = document.getElementById("zen-unified-site-data-panel"); let customizationArea = this._panel.querySelector( "#unified-extensions-area" ); @@ -2608,7 +2604,7 @@ var gUnifiedExtensions = { this.recordButtonTelemetry(reason || "extensions_panel_showing"); this.ensureButtonShownBeforeAttachingPanel(panel); PanelMultiView.openPopup(panel, this._button, { - position: "bottomright topright", + position: gZenUIManager.panelUIPosition, triggerEvent: aEvent, }); } @@ -2795,18 +2791,20 @@ var gUnifiedExtensions = { this._maybeMoveWidgetNodeBack(widgetId); } - this.pinToToolbar(widgetId, shouldPinToToolbar); + await this.pinToToolbar(widgetId, shouldPinToToolbar); }, - pinToToolbar(widgetId, shouldPinToToolbar) { + async pinToToolbar(widgetId, shouldPinToToolbar) { let newArea = shouldPinToToolbar ? CustomizableUI.AREA_NAVBAR : CustomizableUI.AREA_ADDONS; let newPosition = shouldPinToToolbar ? undefined : 0; + await gZenVerticalTabsManager._preCustomize(); CustomizableUI.addWidgetToArea(widgetId, newArea, newPosition); // addWidgetToArea() will trigger onWidgetAdded or onWidgetMoved as needed, // and our handlers will call updateAttention() as needed. + await gZenVerticalTabsManager._postCustomize(); }, async moveWidget(menu, direction) {