mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 01:20:12 +01:00
This commit is contained in:
parent
852ca6744a
commit
39220af36c
1 changed files with 1 additions and 1 deletions
|
|
@ -163,7 +163,6 @@ const focusStack = async (app: App, stack: IBackStack) => {
|
||||||
onGet({
|
onGet({
|
||||||
data: getResponse,
|
data: getResponse,
|
||||||
protyle: stack.protyle,
|
protyle: stack.protyle,
|
||||||
action: [Constants.CB_GET_FOCUS],
|
|
||||||
afterCB() {
|
afterCB() {
|
||||||
Array.from(stack.protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${stack.id}"]`)).find((item: HTMLElement) => {
|
Array.from(stack.protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${stack.id}"]`)).find((item: HTMLElement) => {
|
||||||
if (!hasClosestByAttribute(item, "data-type", "NodeBlockQueryEmbed")) {
|
if (!hasClosestByAttribute(item, "data-type", "NodeBlockQueryEmbed")) {
|
||||||
|
|
@ -180,6 +179,7 @@ const focusStack = async (app: App, stack: IBackStack) => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
focusByOffset(getContenteditableElement(blockElement), stack.position.start, stack.position.end);
|
focusByOffset(getContenteditableElement(blockElement), stack.position.start, stack.position.end);
|
||||||
|
scrollCenter(stack.protyle, blockElement, true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue