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;
|
||||
transform: translateX(-50%);
|
||||
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 {
|
||||
@@ -244,6 +233,7 @@
|
||||
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);
|
||||
gap: 0.8rem;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
:root:not([inDOMFullscreen='true']) .browserSidebarContainer:hover .zen-view-splitter-header-container,
|
||||
|
@@ -489,6 +489,7 @@
|
||||
|
||||
& .zen-current-workspace-indicator-icon {
|
||||
font-size: 12px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.zen-current-workspace-indicator-name {
|
||||
|
@@ -202,6 +202,7 @@ var gZenCompactModeManager = {
|
||||
this._animating = false;
|
||||
this.sidebar.style.removeProperty('visibility');
|
||||
this.sidebar.style.removeProperty('transition');
|
||||
thhis.sidebar.style.removeProperty('opacity');
|
||||
}, 300);
|
||||
});
|
||||
});
|
||||
|
@@ -468,7 +468,6 @@
|
||||
owner &&
|
||||
owner.pinned &&
|
||||
this._lazyPref.SHOULD_OPEN_EXTERNAL_TABS_IN_GLANCE &&
|
||||
owner.linkedBrowser?.docShellIsActive &&
|
||||
owner.linkedBrowser?.browsingContext?.isAppTab &&
|
||||
this.tabDomainsDiffer(owner, uri) &&
|
||||
Services.prefs.getBoolPref('zen.glance.enabled', true)
|
||||
@@ -483,7 +482,11 @@
|
||||
try {
|
||||
if (this.shouldOpenTabInGlance(tab, uri)) {
|
||||
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) {
|
||||
console.error(e);
|
||||
|
@@ -1494,20 +1494,22 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
const canDrop = this._canDrop;
|
||||
this._maybeRemoveFakeBrowser(false);
|
||||
this._canDrop = false;
|
||||
|
||||
if (!canDrop) {
|
||||
return false;
|
||||
}
|
||||
|
||||
window.requestAnimationFrame(() => {
|
||||
const dropTarget = document.elementFromPoint(event.clientX, event.clientY);
|
||||
const browser = dropTarget?.closest('browser');
|
||||
|
||||
gBrowser.selectedTab = this._draggingTab;
|
||||
this._draggingTab = null;
|
||||
|
||||
if (!browser) {
|
||||
return false;
|
||||
}
|
||||
|
||||
gBrowser.selectedTab = this._draggingTab;
|
||||
this._draggingTab = null;
|
||||
|
||||
const droppedOnTab = gBrowser.getTabForBrowser(browser);
|
||||
if (droppedOnTab && droppedOnTab !== draggedTab) {
|
||||
// Calculate which side of the target browser the drop occurred
|
||||
@@ -1582,6 +1584,7 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user