mirror of
https://github.com/zen-browser/desktop.git
synced 2026-01-30 00:26:17 +00:00
fix: Fixed ctrl+K into the urlbar having the wrong coordinates, b=(closes #8093), c=common, tabs, workspaces
This commit is contained in:
@@ -43,9 +43,10 @@ var gZenUIManager = {
|
||||
},
|
||||
|
||||
updateTabsToolbar() {
|
||||
const kUrlbarHeight = 440;
|
||||
gURLBar.textbox.style.setProperty(
|
||||
'--zen-urlbar-top',
|
||||
`${window.innerHeight / 2 - gURLBar.textbox.getBoundingClientRect().height / 2}px`
|
||||
`${window.innerHeight / 2 - Math.max(kUrlbarHeight, gURLBar.textbox.getBoundingClientRect().height) / 2}px`
|
||||
);
|
||||
gZenVerticalTabsManager.actualWindowButtons.removeAttribute('zen-has-hover');
|
||||
gZenVerticalTabsManager.recalculateURLBarHeight();
|
||||
@@ -83,6 +84,9 @@ var gZenUIManager = {
|
||||
onFloatingURLBarOpen() {
|
||||
requestAnimationFrame(() => {
|
||||
this.updateTabsToolbar();
|
||||
requestAnimationFrame(() => {
|
||||
this.updateTabsToolbar();
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
@@ -208,6 +208,10 @@
|
||||
Segoe UI Symbol,
|
||||
Noto Color Emoji;
|
||||
}
|
||||
|
||||
&:not([chromehidden~='toolbar']) {
|
||||
min-height: 495px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
|
||||
@@ -47,6 +47,8 @@
|
||||
}
|
||||
|
||||
class ZenPinnedTabManager extends ZenDOMOperatedFeature {
|
||||
MAX_ESSENTIALS_TABS = 12;
|
||||
|
||||
async init() {
|
||||
if (!this.enabled) {
|
||||
return;
|
||||
@@ -639,6 +641,10 @@
|
||||
: [TabContextMenu.contextTab];
|
||||
for (let i = 0; i < tabs.length; i++) {
|
||||
let tab = tabs[i];
|
||||
const section = ZenWorkspaces.getEssentialsSection(tab);
|
||||
if (section.children.length >= this.MAX_ESSENTIALS_TABS) {
|
||||
continue;
|
||||
}
|
||||
if (tab.hasAttribute('zen-essential')) {
|
||||
continue;
|
||||
}
|
||||
@@ -658,7 +664,7 @@
|
||||
});
|
||||
tab.setAttribute('zen-essential', 'true');
|
||||
} else {
|
||||
ZenWorkspaces.getEssentialsSection(tab).appendChild(tab);
|
||||
section.appendChild(tab);
|
||||
}
|
||||
gBrowser.tabContainer._invalidateCachedTabs();
|
||||
} else {
|
||||
|
||||
@@ -2271,7 +2271,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
|
||||
const containerId = workspace.containerTabId?.toString();
|
||||
const workspaces = await this._workspaces();
|
||||
|
||||
|
||||
// Save current tab as last selected for old workspace if it shouldn't be visible in new workspace
|
||||
if (oldWorkspaceId && oldWorkspaceId !== workspace.uuid) {
|
||||
this._lastSelectedWorkspaceTabs[oldWorkspaceId] = gZenGlanceManager.getTabOrGlanceParent(currentSelectedTab);
|
||||
|
||||
Reference in New Issue
Block a user