mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
Merge branch 'dev' of https://github.com/zen-browser/desktop into dev
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
<command id="cmd_zenWorkspaceSwitch10" />
|
||||
|
||||
<command id="cmd_zenOpenZenThemePicker" />
|
||||
<command id="cmd_zenChangeWorkspaceTabColor" />
|
||||
<command id="cmd_zenChangeWorkspaceTab" />
|
||||
<command id="cmd_zenToggleTabsOnRight" />
|
||||
|
||||
<command id="cmd_zenReplacePinnedUrlWithCurrent" />
|
||||
|
@@ -53,7 +53,7 @@ document.addEventListener(
|
||||
gZenThemePicker.openThemePicker(event);
|
||||
break;
|
||||
case 'cmd_zenChangeWorkspaceTab':
|
||||
ZenWorkspaces.changeTabWorkspace(event.target.getAttribute('zen-workspace-id'));
|
||||
ZenWorkspaces.changeTabWorkspace(event.sourceEvent.target.getAttribute('zen-workspace-id'));
|
||||
break;
|
||||
case 'cmd_zenToggleTabsOnRight':
|
||||
gZenVerticalTabsManager.toggleTabsOnRight();
|
||||
|
@@ -234,14 +234,23 @@
|
||||
});
|
||||
}
|
||||
|
||||
closeGlance({ noAnimation = false, onTabClose = false, setNewID = null, isDifferent = false, hasFocused = false } = {}) {
|
||||
closeGlance({
|
||||
noAnimation = false,
|
||||
onTabClose = false,
|
||||
setNewID = null,
|
||||
isDifferent = false,
|
||||
hasFocused = false,
|
||||
skipPermitUnload = false,
|
||||
} = {}) {
|
||||
if (this._animating || !this.#currentBrowser || this.animatingOpen || this._duringOpening) {
|
||||
return;
|
||||
}
|
||||
|
||||
let { permitUnload } = this.#currentBrowser.permitUnload();
|
||||
if (!permitUnload) {
|
||||
return;
|
||||
if (!skipPermitUnload) {
|
||||
let { permitUnload } = this.#currentBrowser.permitUnload();
|
||||
if (!permitUnload) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (onTabClose && hasFocused && !this.#confirmationTimeout) {
|
||||
@@ -545,7 +554,7 @@
|
||||
this.overlay.classList.remove('zen-glance-overlay');
|
||||
this._clearContainerStyles(this.browserWrapper);
|
||||
this.animatingFullOpen = false;
|
||||
this.closeGlance({ noAnimation: true });
|
||||
this.closeGlance({ noAnimation: true, skipPermitUnload: true });
|
||||
this.#glances.delete(this.#currentGlanceID);
|
||||
}
|
||||
|
||||
|
@@ -1898,6 +1898,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
const menuItem = document.createXULElement('menuitem');
|
||||
menuItem.setAttribute('label', workspace.name);
|
||||
menuItem.setAttribute('zen-workspace-id', workspace.uuid);
|
||||
menuItem.setAttribute('command', 'cmd_zenChangeWorkspaceTab');
|
||||
|
||||
if (workspace.uuid === activeWorkspace.uuid) {
|
||||
menuItem.setAttribute('disabled', 'true');
|
||||
@@ -2208,7 +2209,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
|
||||
const menuPopup = document.createXULElement('menupopup');
|
||||
menuPopup.setAttribute('id', 'context-zen-change-workspace-tab-menu-popup');
|
||||
menuPopup.setAttribute('command', 'cmd_zenChangeWorkspaceTab');
|
||||
|
||||
menu.appendChild(menuPopup);
|
||||
|
||||
|
Reference in New Issue
Block a user