From c32d1fe09f8faebff40cb68b2a58c0560c288272 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 4 May 2024 16:13:54 +0800 Subject: [PATCH] :art: fix https://ld246.com/article/1714793810071 --- app/src/protyle/wysiwyg/input.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/protyle/wysiwyg/input.ts b/app/src/protyle/wysiwyg/input.ts index 919a708f2..cf2534db8 100644 --- a/app/src/protyle/wysiwyg/input.ts +++ b/app/src/protyle/wysiwyg/input.ts @@ -157,7 +157,7 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range: log("SpinBlockDOM", html, "result", protyle.options.debugger); let scrollLeft: number; if (blockElement.classList.contains("table")) { - scrollLeft = getContenteditableElement(blockElement).scrollLeft; + scrollLeft = blockElement.firstElementChild.scrollLeft; } if (/.+<\/span>/.test(html)) { // 转义不需要添加 zwsp @@ -235,7 +235,7 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range: protyle.hint.render(protyle); // 表格出现滚动条,输入数字会向前滚 https://github.com/siyuan-note/siyuan/issues/3650 if (scrollLeft > 0) { - getContenteditableElement(realElement).scrollLeft = scrollLeft; + blockElement.firstElementChild.scrollLeft = scrollLeft; } } }