Skip to content

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

:bug: Preserve the inline caret when undoing forward deletion https://github.com/siyuan-note/siyuan/issues/11248

Danielebc1a7cb0041
diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts
index 11b63c1e03..e75fa1f457 100644
--- a/app/src/protyle/wysiwyg/index.ts
+++ b/app/src/protyle/wysiwyg/index.ts
@@ -4126,7 +4126,7 @@ export class WYSIWYG {
getUndoFocusContext(protyle.wysiwyg.element, selection.getRangeAt(0)) : undefined;
forwardDeleteUndoContext = !event.defaultPrevented && event.inputType === "deleteContentForward" &&
selection.rangeCount > 0 && selection.getRangeAt(0).collapsed ?
- getUndoFocusContext(protyle.wysiwyg.element, selection.getRangeAt(0), true) : undefined;
+ getUndoFocusContext(protyle.wysiwyg.element, selection.getRangeAt(0)) : undefined;
if (event.defaultPrevented || !isTextInputType(event.inputType, event.data) ||
selection.rangeCount === 0) {
return;