mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-01 14:28:49 +01:00
This commit is contained in:
parent
6ae0e39436
commit
f28ce5a3b7
1 changed files with 3 additions and 3 deletions
|
|
@ -333,7 +333,7 @@ const deleteBlock = (updateElements: Element[], id: string, protyle: IProtyle) =
|
|||
});
|
||||
}
|
||||
|
||||
const updateBlock = (updateElements: Element[], protyle: IProtyle, operation: IOperation) => {
|
||||
const updateBlock = (updateElements: Element[], protyle: IProtyle, operation: IOperation, focus: boolean) => {
|
||||
updateElements.forEach(item => {
|
||||
item.outerHTML = operation.data;
|
||||
});
|
||||
|
|
@ -444,7 +444,7 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, focus: b
|
|||
}
|
||||
if (operation.action === "update") {
|
||||
if (updateElements.length > 0) {
|
||||
updateBlock(updateElements, protyle, operation);
|
||||
updateBlock(updateElements, protyle, operation, focus);
|
||||
} else {
|
||||
zoomOut({
|
||||
protyle,
|
||||
|
|
@ -457,7 +457,7 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, focus: b
|
|||
updateElements.push(item);
|
||||
}
|
||||
});
|
||||
updateBlock(updateElements, protyle, operation);
|
||||
updateBlock(updateElements, protyle, operation, focus);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue