mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-25 00:14:07 +01:00
🚨
This commit is contained in:
parent
a78c853d8d
commit
cd6d1533ca
3 changed files with 14 additions and 14 deletions
|
|
@ -68,9 +68,9 @@ export const scrollCenter = (protyle: IProtyle, nodeElement?: Element, top = fal
|
|||
parentNodeElement = parentNodeElement.parentElement;
|
||||
}
|
||||
let contentTop = 0;
|
||||
let topElement = protyle.element.firstElementChild
|
||||
let topElement = protyle.element.firstElementChild;
|
||||
while (topElement && !topElement.classList.contains("protyle-content")) {
|
||||
contentTop += topElement.clientHeight
|
||||
contentTop += topElement.clientHeight;
|
||||
topElement = topElement.nextElementSibling;
|
||||
}
|
||||
if (top) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue