From c79e2f79f5842a1ca72353b87230e045f6759e82 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 28 Apr 2024 20:05:12 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/11175 --- app/src/util/highlightById.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/util/highlightById.ts b/app/src/util/highlightById.ts index 270cb87ea..ed3b4a2c9 100644 --- a/app/src/util/highlightById.ts +++ b/app/src/util/highlightById.ts @@ -62,7 +62,9 @@ export const scrollCenter = (protyle: IProtyle, nodeElement?: Element, top = fal } } - if (!nodeElement) { + if (!nodeElement && + // https://github.com/siyuan-note/siyuan/issues/11175 + document.activeElement?.tagName !== "TEXTAREA" && document.activeElement?.tagName !== "INPUT") { nodeElement = hasClosestBlock(getEditorRange(protyle.wysiwyg.element).startContainer) as HTMLElement; } if (!nodeElement) {