Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed May 4, 2024
1 parent 68f81e2 commit c32d1fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/protyle/wysiwyg/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 data-type="backslash">.+<\/span><wbr>/.test(html)) {
// 转义不需要添加 zwsp
Expand Down Expand Up @@ -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;
}
}
}
Expand Down

0 comments on commit c32d1fe

Please sign in to comment.