mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 01:20:12 +01:00
This commit is contained in:
parent
0bccdb6f29
commit
e68e608470
1 changed files with 4 additions and 4 deletions
|
|
@ -91,7 +91,7 @@ const focusStack = async (stack: IBackStack) => {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
focusByOffset(blockElement, stack.position.start, stack.position.end);
|
focusByOffset(getContenteditableElement(blockElement), stack.position.start, stack.position.end);
|
||||||
scrollCenter(protyle, blockElement);
|
scrollCenter(protyle, blockElement);
|
||||||
}
|
}
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
@ -125,7 +125,7 @@ const focusStack = async (stack: IBackStack) => {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (blockElement && !stack.protyle.block.showAll) {
|
if (blockElement && !stack.protyle.block.showAll) {
|
||||||
focusByOffset(blockElement, stack.position.start, stack.position.end);
|
focusByOffset(getContenteditableElement(blockElement), stack.position.start, stack.position.end);
|
||||||
scrollCenter(stack.protyle, blockElement, true);
|
scrollCenter(stack.protyle, blockElement, true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -142,7 +142,7 @@ const focusStack = async (stack: IBackStack) => {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
focusByOffset(blockElement, stack.position.start, stack.position.end);
|
focusByOffset(getContenteditableElement(blockElement), stack.position.start, stack.position.end);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// 图片、视频等加载完成后再定位
|
// 图片、视频等加载完成后再定位
|
||||||
scrollCenter(stack.protyle, blockElement, true);
|
scrollCenter(stack.protyle, blockElement, true);
|
||||||
|
|
@ -177,7 +177,7 @@ const focusStack = async (stack: IBackStack) => {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
focusByOffset(blockElement, stack.position.start, stack.position.end);
|
focusByOffset(getContenteditableElement(blockElement), stack.position.start, stack.position.end);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
scrollCenter(stack.protyle, blockElement);
|
scrollCenter(stack.protyle, blockElement);
|
||||||
}, Constants.TIMEOUT_INPUT);
|
}, Constants.TIMEOUT_INPUT);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue