mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-10 01:04:21 +01:00
This commit is contained in:
parent
cea5821c0b
commit
abe85de042
2 changed files with 6 additions and 2 deletions
|
|
@ -392,9 +392,10 @@ const switchEditor = (editor: Editor, options: IOpenFileOptions, allModels: IMod
|
|||
editor.editor.protyle.toolbar.range = newRange;
|
||||
}
|
||||
scrollCenter(editor.editor.protyle, nodeElement, true);
|
||||
|
||||
const resizeObserver = new ResizeObserver(() => {
|
||||
scrollCenter(editor.editor.protyle, nodeElement, true);
|
||||
if (document.contains(nodeElement)) {
|
||||
scrollCenter(editor.editor.protyle, nodeElement, true);
|
||||
}
|
||||
});
|
||||
setTimeout(() => {
|
||||
resizeObserver.disconnect();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue