Skip to content

Commit c32d1fe

Browse files
committedMay 4, 2024
1 parent 68f81e2 commit c32d1fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎app/src/protyle/wysiwyg/input.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range:
157157
log("SpinBlockDOM", html, "result", protyle.options.debugger);
158158
let scrollLeft: number;
159159
if (blockElement.classList.contains("table")) {
160-
scrollLeft = getContenteditableElement(blockElement).scrollLeft;
160+
scrollLeft = blockElement.firstElementChild.scrollLeft;
161161
}
162162
if (/<span data-type="backslash">.+<\/span><wbr>/.test(html)) {
163163
// 转义不需要添加 zwsp
@@ -235,7 +235,7 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range:
235235
protyle.hint.render(protyle);
236236
// 表格出现滚动条,输入数字会向前滚 https://github.com/siyuan-note/siyuan/issues/3650
237237
if (scrollLeft > 0) {
238-
getContenteditableElement(realElement).scrollLeft = scrollLeft;
238+
blockElement.firstElementChild.scrollLeft = scrollLeft;
239239
}
240240
}
241241
}

0 commit comments

Comments
 (0)
Please sign in to comment.