mirror of
https://github.com/zen-browser/desktop.git
synced 2026-07-16 21:51:06 +00:00
gh-13364: Fixed split out context menu showing wrong label (gh-13365)
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
"chrome://browser/content/zen-components/ZenFolders.mjs",
|
||||
"chrome://browser/content/zen-components/ZenEmojiPicker.mjs",
|
||||
"chrome://browser/content/zen-components/ZenLiveFoldersUI.mjs",
|
||||
"chrome://browser/content/zen-components/ZenDownloadAnimation.mjs",
|
||||
];
|
||||
|
||||
for (let script of scripts) {
|
||||
@@ -30,7 +31,6 @@
|
||||
|
||||
let customZenElements = [
|
||||
["zen-folder", "chrome://browser/content/zen-components/ZenFolder.mjs"],
|
||||
["zen-download-animation", "chrome://browser/content/zen-components/ZenDownloadAnimation.mjs"],
|
||||
["zen-workspace-creation", "resource:///modules/zen/ZenSpaceCreation.mjs"],
|
||||
["zen-workspace", "resource:///modules/zen/ZenSpace.mjs"],
|
||||
["zen-workspace-icons", "resource:///modules/zen/ZenSpaceIcons.mjs"]
|
||||
@@ -43,12 +43,12 @@
|
||||
// used before DOMContentLoaded it will be imported and upgraded when
|
||||
// registering the customElements.setElementCreationCallback().
|
||||
for (let [tag, script] of customZenElements) {
|
||||
customElements.setElementCreationCallback(
|
||||
tag,
|
||||
function customElementCreationCallback() {
|
||||
ChromeUtils.importESModule(script, { global: "current" });
|
||||
}
|
||||
);
|
||||
customElements.setElementCreationCallback(
|
||||
tag,
|
||||
function customElementCreationCallback() {
|
||||
ChromeUtils.importESModule(script, { global: "current" });
|
||||
}
|
||||
);
|
||||
}
|
||||
},
|
||||
{ once: true }
|
||||
|
||||
@@ -1166,7 +1166,10 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature {
|
||||
insetUpdateContextMenuItems() {
|
||||
const contentAreaContextMenu = document.getElementById("tabContextMenu");
|
||||
contentAreaContextMenu.addEventListener("popupshowing", () => {
|
||||
let contextTab = TabContextMenu.contextTab || gBrowser.selectedTab;
|
||||
let contextTab = TabContextMenu.contextTab;
|
||||
if (!contextTab) {
|
||||
return;
|
||||
}
|
||||
let selectedTabs = contextTab.multiselected
|
||||
? gBrowser.selectedTabs
|
||||
: [contextTab];
|
||||
@@ -1249,6 +1252,11 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature {
|
||||
let currentTab = TabContextMenu.contextTab || gBrowser.selectedTab;
|
||||
if (currentTab.multiselected) {
|
||||
tabs = gBrowser.selectedTabs;
|
||||
} else if (!currentTab.selected) {
|
||||
tabs = [
|
||||
currentTab,
|
||||
...gBrowser.selectedTabs.filter(t => t !== currentTab),
|
||||
];
|
||||
} else {
|
||||
tabs = [currentTab];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user