mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-30 05:18:49 +01:00
This commit is contained in:
parent
cea5821c0b
commit
abe85de042
2 changed files with 6 additions and 2 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue