Skip to content

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

:bug: Restore default mind map pan cursors on Linux https://github.com/siyuan-note/siyuan/issues/20696

Daniel2584c7b40ba0
diff --git a/app/src/assets/scss/protyle/_mindmap-view.scss b/app/src/assets/scss/protyle/_mindmap-view.scss
index b398e2244f..fcce7cebf9 100644
--- a/app/src/assets/scss/protyle/_mindmap-view.scss
+++ b/app/src/assets/scss/protyle/_mindmap-view.scss
@@ -268,11 +268,6 @@
}
}
- // 部分 Linux 桌面环境切换抓手光标会阻塞输入,拖动画布时保留普通箭头。
- .body--linux &__viewport--dragging {
- cursor: default;
- }
-
&__world {
position: absolute;
left: 0;
diff --git a/app/src/protyle/render/listMindmap/model.test.ts b/app/src/protyle/render/listMindmap/model.test.ts
index 992c73dc41..375f4f04e9 100644
--- a/app/src/protyle/render/listMindmap/model.test.ts
+++ b/app/src/protyle/render/listMindmap/model.test.ts
@@ -3313,7 +3313,7 @@ const browserCases = async (sourceCode: string, css: string, taskSource: string,
check.equal(getComputedStyle(panViewport).cursor, "grabbing");
for (const platform of ["body--linux", "body--windows", "body--mac", "body--android", "body--ios", "body--harmony"]) {
document.body.classList.add(platform);
- check.equal(getComputedStyle(panViewport).cursor, platform === "body--linux" ? "default" : "grabbing",
+ check.equal(getComputedStyle(panViewport).cursor, "grabbing",
`${platform} hand-tool dragging uses the platform cursor`);
document.body.classList.remove(platform);
}
@@ -3512,7 +3512,7 @@ const browserCases = async (sourceCode: string, css: string, taskSource: string,
await settle();
check.deepEqual([panView.offsetX, panView.offsetY], [before[0] + 24, before[1] + 16],
"native right dragging starts on the first move, including after idle");
- check.equal(getComputedStyle(viewport).cursor, platform === "body--linux" ? "default" : "grabbing",
+ check.equal(getComputedStyle(viewport).cursor, "grabbing",
`${platform} native right dragging uses the platform cursor, including after idle`);
check.ok(Array.from(panHost.querySelectorAll<HTMLElement>(".mindmap-view__node"))
.every(element => getComputedStyle(element).cursor === "default"),