Skip to content

Commit

Permalink
🐛 #12710
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 authored and 88250 committed Oct 7, 2024
1 parent 4de3649 commit 78ba07b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/src/protyle/wysiwyg/keydown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,9 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
if (previousElement) {
const foldElement = hasClosestByAttribute(previousElement, "fold", "1") as HTMLElement;
// 代码块或以软换行结尾的块移动光标 ↑ 会跳过 https://github.com/siyuan-note/siyuan/issues/5498
if (!foldElement) {
// 代码块全选后 ↑ 光标不会上移 https://github.com/siyuan-note/siyuan/issues/11581
// 段落块不能设置,否则 ↑ 后光标位置不能保持 https://github.com/siyuan-note/siyuan/issues/12710
if (!foldElement && previousElement.classList.contains("code-block")) {
focusBlock(previousElement, undefined, false);
scrollCenter(protyle, previousElement);
event.stopPropagation();
Expand Down

0 comments on commit 78ba07b

Please sign in to comment.