mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-16 14:56:14 +00:00
Fixed common issues with split views and glance
This commit is contained in:
@@ -222,17 +222,6 @@
|
|||||||
z-index: 100;
|
z-index: 100;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
|
||||||
&::before {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
width: 100%;
|
|
||||||
height: 6px;
|
|
||||||
background: var(--zen-colors-border);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.zen-view-splitter-header {
|
.zen-view-splitter-header {
|
||||||
@@ -244,6 +233,7 @@
|
|||||||
background-color: light-dark(rgba(255, 255, 255, 1), rgba(0, 0, 0, 1));
|
background-color: light-dark(rgba(255, 255, 255, 1), rgba(0, 0, 0, 1));
|
||||||
box-shadow: 0 0 0 1px var(--button-primary-border-color);
|
box-shadow: 0 0 0 1px var(--button-primary-border-color);
|
||||||
gap: 0.8rem;
|
gap: 0.8rem;
|
||||||
|
transform: translateX(-50%);
|
||||||
}
|
}
|
||||||
|
|
||||||
:root:not([inDOMFullscreen='true']) .browserSidebarContainer:hover .zen-view-splitter-header-container,
|
:root:not([inDOMFullscreen='true']) .browserSidebarContainer:hover .zen-view-splitter-header-container,
|
||||||
|
@@ -489,6 +489,7 @@
|
|||||||
|
|
||||||
& .zen-current-workspace-indicator-icon {
|
& .zen-current-workspace-indicator-icon {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.zen-current-workspace-indicator-name {
|
.zen-current-workspace-indicator-name {
|
||||||
|
@@ -202,6 +202,7 @@ var gZenCompactModeManager = {
|
|||||||
this._animating = false;
|
this._animating = false;
|
||||||
this.sidebar.style.removeProperty('visibility');
|
this.sidebar.style.removeProperty('visibility');
|
||||||
this.sidebar.style.removeProperty('transition');
|
this.sidebar.style.removeProperty('transition');
|
||||||
|
thhis.sidebar.style.removeProperty('opacity');
|
||||||
}, 300);
|
}, 300);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -468,7 +468,6 @@
|
|||||||
owner &&
|
owner &&
|
||||||
owner.pinned &&
|
owner.pinned &&
|
||||||
this._lazyPref.SHOULD_OPEN_EXTERNAL_TABS_IN_GLANCE &&
|
this._lazyPref.SHOULD_OPEN_EXTERNAL_TABS_IN_GLANCE &&
|
||||||
owner.linkedBrowser?.docShellIsActive &&
|
|
||||||
owner.linkedBrowser?.browsingContext?.isAppTab &&
|
owner.linkedBrowser?.browsingContext?.isAppTab &&
|
||||||
this.tabDomainsDiffer(owner, uri) &&
|
this.tabDomainsDiffer(owner, uri) &&
|
||||||
Services.prefs.getBoolPref('zen.glance.enabled', true)
|
Services.prefs.getBoolPref('zen.glance.enabled', true)
|
||||||
@@ -483,7 +482,11 @@
|
|||||||
try {
|
try {
|
||||||
if (this.shouldOpenTabInGlance(tab, uri)) {
|
if (this.shouldOpenTabInGlance(tab, uri)) {
|
||||||
const browserRect = gBrowser.tabbox.getBoundingClientRect();
|
const browserRect = gBrowser.tabbox.getBoundingClientRect();
|
||||||
this.openGlance({ url: undefined, x: browserRect.width / 2, y: browserRect.height / 2, width: 0, height: 0 });
|
this.openGlance(
|
||||||
|
{ url: undefined, x: browserRect.width / 2, y: browserRect.height / 2, width: 0, height: 0 },
|
||||||
|
tab,
|
||||||
|
tab.owner
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
@@ -1494,20 +1494,22 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
|||||||
const canDrop = this._canDrop;
|
const canDrop = this._canDrop;
|
||||||
this._maybeRemoveFakeBrowser(false);
|
this._maybeRemoveFakeBrowser(false);
|
||||||
this._canDrop = false;
|
this._canDrop = false;
|
||||||
|
|
||||||
if (!canDrop) {
|
if (!canDrop) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.requestAnimationFrame(() => {
|
||||||
const dropTarget = document.elementFromPoint(event.clientX, event.clientY);
|
const dropTarget = document.elementFromPoint(event.clientX, event.clientY);
|
||||||
const browser = dropTarget?.closest('browser');
|
const browser = dropTarget?.closest('browser');
|
||||||
|
|
||||||
gBrowser.selectedTab = this._draggingTab;
|
|
||||||
this._draggingTab = null;
|
|
||||||
|
|
||||||
if (!browser) {
|
if (!browser) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gBrowser.selectedTab = this._draggingTab;
|
||||||
|
this._draggingTab = null;
|
||||||
|
|
||||||
const droppedOnTab = gBrowser.getTabForBrowser(browser);
|
const droppedOnTab = gBrowser.getTabForBrowser(browser);
|
||||||
if (droppedOnTab && droppedOnTab !== draggedTab) {
|
if (droppedOnTab && droppedOnTab !== draggedTab) {
|
||||||
// Calculate which side of the target browser the drop occurred
|
// Calculate which side of the target browser the drop occurred
|
||||||
@@ -1582,6 +1584,7 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user