Skip to content

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

:art: https://github.com/siyuan-note/siyuan/issues/16207

Vanessa5bf5684d17e7
diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts
index f83c23f43a..06ab687bed 100644
--- a/app/src/protyle/wysiwyg/keydown.ts
+++ b/app/src/protyle/wysiwyg/keydown.ts
@@ -672,7 +672,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
if (previousElement) {
previousElement = getLastBlock(previousElement) as HTMLElement;
if (previousElement) {
- const foldElement = hasClosestByAttribute(previousElement, "fold", "1") as HTMLElement;
+ const foldElement = hasTopClosestByAttribute(previousElement, "fold", "1") as HTMLElement;
// 代码块或以软换行结尾的块移动光标 ↑ 会跳过 https://github.com/siyuan-note/siyuan/issues/5498
// 代码块全选后 ↑ 光标不会上移 https://github.com/siyuan-note/siyuan/issues/11581
// 段落块不能设置,否则 ↑ 后光标位置不能保持 https://github.com/siyuan-note/siyuan/issues/12710