mirror of
https://github.com/zen-browser/desktop.git
synced 2026-02-02 10:04:37 +00:00
feat: Fixed split view not working on windows when dropping, b=closes #12143, c=no-component
This commit is contained in:
@@ -672,10 +672,16 @@
|
||||
if (!isTab(draggedTab)) {
|
||||
return;
|
||||
}
|
||||
const { clientX, clientY } = event;
|
||||
const { innerWidth, innerHeight } = window;
|
||||
const { screenX, screenY } = event;
|
||||
if (!screenX && !screenY) {
|
||||
return;
|
||||
}
|
||||
const { innerWidth, innerHeight, screenX: windowScreenX, screenY: windowScreenY } = window;
|
||||
const isOutOfWindow =
|
||||
clientX < 0 || clientX > innerWidth || clientY < 0 || clientY > innerHeight;
|
||||
screenX < windowScreenX ||
|
||||
screenX > windowScreenX + innerWidth ||
|
||||
screenY < windowScreenY ||
|
||||
screenY > windowScreenY + innerHeight;
|
||||
if (isOutOfWindow && !this.#isOutOfWindow) {
|
||||
this.#isOutOfWindow = true;
|
||||
gZenViewSplitter.onBrowserDragEndToSplit(event, true);
|
||||
|
||||
Reference in New Issue
Block a user