mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-07-03 14:09:06 +02:00
This commit is contained in:
@@ -557,6 +557,9 @@ const fileTreeKeydown = (app: App, event: KeyboardEvent) => {
|
||||
return false;
|
||||
}
|
||||
const files = dockFile.data.file as Files;
|
||||
if (typeof dockFile.data.file === "boolean") {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (matchHotKey(window.siyuan.config.keymap.general.selectOpen1.custom, event)) {
|
||||
event.preventDefault();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user