Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: fix https://github.com/siyuan-note/siyuan/issues/11014

Vanessaa773a564543c
diff --git a/app/src/layout/Tab.ts b/app/src/layout/Tab.ts
index 3067e4a38f..9aacd94a32 100644
--- a/app/src/layout/Tab.ts
+++ b/app/src/layout/Tab.ts
@@ -7,7 +7,7 @@ import {Constants} from "../constants";
import {escapeGreat, escapeHtml} from "../util/escape";
import {unicode2Emoji} from "../emoji";
import {fetchPost} from "../util/fetch";
-import {showTooltip} from "../dialog/tooltip";
+import {hideTooltip, showTooltip} from "../dialog/tooltip";
import {isTouchDevice} from "../util/functions";
/// #if !BROWSER
import {openNewWindow} from "../window/openNewWindow";
@@ -77,6 +77,7 @@ export class Tab {
return;
}
window.getSelection().removeAllRanges();
+ hideTooltip();
const tabElement = hasClosestByTag(event.target, "LI");
if (tabElement) {
event.dataTransfer.setData("text/html", tabElement.outerHTML);
diff --git a/app/src/layout/Wnd.ts b/app/src/layout/Wnd.ts
index 527a4765ad..1bee1396b1 100644
--- a/app/src/layout/Wnd.ts
+++ b/app/src/layout/Wnd.ts
@@ -315,15 +315,13 @@ export class Wnd {
const width = rect.width;
const x = event.clientX - rect.left;
const y = event.clientY - rect.top;
- if ((x <= width / 3 && (y <= height / 8 || y >= height * 7 / 8)) ||
- (x <= width / 8 && (y > height / 8 || y < height * 7 / 8))) {
+ if (x <= width / 8 || (x <= width / 3 && x > width / 8 && y >= height / 8 && y <= height * 7 / 8)) {
dragElement.setAttribute("style", "height:100%;width:50%;right:50%;bottom:0;left:0;top:0");
- } else if ((x > width * 2 / 3 && (y <= height / 8 || y >= height * 7 / 8)) ||
- (x >= width * 7 / 8 && (y > height / 8 || y < height * 7 / 8))) {
+ } else if (x >= width * 7 / 8 || (x >= width * 2 / 3 && x < width * 7 / 8 && y >= height / 8 && y <= height * 7 / 8)) {
dragElement.setAttribute("style", "height:100%;width:50%;right:0;bottom:0;left:50%;top:0");
- } else if (x > width / 3 && x < width * 2 / 3 && y <= height / 8) {
+ } else if (y <= height / 8) {
dragElement.setAttribute("style", "height:50%;width:100%;right:0;bottom:50%;left:0;top:0");
- } else if (x > width / 3 && x < width * 2 / 3 && y >= height * 7 / 8) {
+ } else if (y >= height * 7 / 8) {
dragElement.setAttribute("style", "height:50%;width:100%;right:0;bottom:0;left:0;top:50%");
} else {
dragElement.setAttribute("style", "height:100%;width:100%;right:0;bottom:0;top:0;left:0");