mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-08 00:04:21 +01:00
This commit is contained in:
parent
4389a51803
commit
45e6ee96c1
1 changed files with 12 additions and 1 deletions
|
|
@ -860,7 +860,7 @@ export class Toolbar {
|
|||
if (!nodeElement) {
|
||||
return;
|
||||
}
|
||||
hideElements(["hint"], protyle);
|
||||
hideElements(["hint", "select"], protyle);
|
||||
window.siyuan.menus.menu.remove();
|
||||
const id = nodeElement.getAttribute("data-node-id");
|
||||
const types = (renderElement.getAttribute("data-type") || "").split(" ");
|
||||
|
|
@ -1103,8 +1103,19 @@ export class Toolbar {
|
|||
}
|
||||
});
|
||||
this.subElementCloseCB = () => {
|
||||
protyle.wysiwyg.element.focus({ preventScroll: true});
|
||||
if (!renderElement.parentElement || protyle.disabled ||
|
||||
(oldTextValue === textElement.value && textElement.value)) {
|
||||
if (renderElement.tagName === "SPAN") {
|
||||
if (renderElement.parentElement) {
|
||||
this.range.setStartAfter(renderElement);
|
||||
this.range.collapse(true);
|
||||
focusByRange(this.range);
|
||||
}
|
||||
} else {
|
||||
focusBlock(renderElement);
|
||||
renderElement.classList.add("protyle-wysiwyg--select");
|
||||
}
|
||||
return;
|
||||
}
|
||||
let inlineLastNode: Element;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue