mirror of
https://github.com/zen-browser/desktop.git
synced 2026-01-08 06:13:22 +00:00
fix: Hide Unified Panel when navigating to management pages, p=#11790
* Hide unified panel popup after context menu actions Signed-off-by: realSilasYang <64590265+realSilasYang@users.noreply.github.com> * Add unified extensions manage hook initialization Signed-off-by: realSilasYang <64590265+realSilasYang@users.noreply.github.com> * Fix indentation in ZenSiteDataPanel.sys.mjs Signed-off-by: realSilasYang <64590265+realSilasYang@users.noreply.github.com> * Refactor code for better readability and consistency Signed-off-by: realSilasYang <64590265+realSilasYang@users.noreply.github.com> * Remove hidePopup call in addons context menu Remove call to hidePopup in context_zenOpenGetAddons. Signed-off-by: realSilasYang <64590265+realSilasYang@users.noreply.github.com> * Refactor code for consistency and readability Signed-off-by: realSilasYang <64590265+realSilasYang@users.noreply.github.com> * Simplify event listener setup for manageExtensionItem Removed unnecessary check for manageExtensionItem and unifiedPanel before adding event listener. Signed-off-by: mr. m <91018726+mr-cheffy@users.noreply.github.com> --------- Signed-off-by: realSilasYang <64590265+realSilasYang@users.noreply.github.com> Signed-off-by: mr. m <91018726+mr-cheffy@users.noreply.github.com> Co-authored-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>
This commit is contained in:
@@ -63,6 +63,7 @@ export class nsZenSiteDataPanel {
|
||||
|
||||
this.#initCopyUrlButton();
|
||||
this.#initEventListeners();
|
||||
this.#initUnifiedExtensionsManageHook();
|
||||
this.#maybeShowFeatureCallout();
|
||||
}
|
||||
|
||||
@@ -142,6 +143,16 @@ export class nsZenSiteDataPanel {
|
||||
}
|
||||
}
|
||||
|
||||
#initUnifiedExtensionsManageHook() {
|
||||
const manageExtensionItem = this.document.getElementById(
|
||||
'unified-extensions-context-menu-manage-extension'
|
||||
);
|
||||
|
||||
manageExtensionItem.addEventListener('command', () => {
|
||||
this.unifiedPanel.hidePopup();
|
||||
});
|
||||
}
|
||||
|
||||
#initExtensionsPanel() {
|
||||
const panel = this.window.gUnifiedExtensions.panel;
|
||||
|
||||
@@ -584,6 +595,7 @@ export class nsZenSiteDataPanel {
|
||||
case 'zen-site-data-manage-addons': {
|
||||
const { BrowserAddonUI } = this.window;
|
||||
BrowserAddonUI.openAddonsMgr('addons://list/extension');
|
||||
this.unifiedPanel.hidePopup();
|
||||
break;
|
||||
}
|
||||
case 'zen-site-data-settings-more': {
|
||||
|
||||
Reference in New Issue
Block a user