From d2863f096e7c405f12c459be2820d5a384f64456 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 31 Dec 2024 08:58:53 +0800 Subject: [PATCH] :rotating_light: --- app/src/protyle/util/insertHTML.ts | 4 ++-- app/src/protyle/wysiwyg/transaction.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/protyle/util/insertHTML.ts b/app/src/protyle/util/insertHTML.ts index 81a2c8140..2fd96d01b 100644 --- a/app/src/protyle/util/insertHTML.ts +++ b/app/src/protyle/util/insertHTML.ts @@ -235,11 +235,11 @@ const processAV = (range: Range, html: string, protyle: IProtyle, blockElement: } document.querySelector(".av__panel")?.remove(); } else if (hasClosestByClassName(range.startContainer, "av__title")) { - const node = document.createTextNode(text) + const node = document.createTextNode(text); range.insertNode(node); range.setEnd(node, text.length); range.collapse(false); - focusByRange(range) + focusByRange(range); updateAVName(protyle, blockElement); } }); diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts index 745bf8c7c..82c7565c4 100644 --- a/app/src/protyle/wysiwyg/transaction.ts +++ b/app/src/protyle/wysiwyg/transaction.ts @@ -51,7 +51,7 @@ const removeTopElement = (updateElement: Element, protyle: IProtyle) => { id: protyle.block.rootID, isPushBack: false, focusId: protyle.block.id, - }) + }); } } if (doOperations.length > 0) {