mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 16:58:49 +01:00
🎨 https://github.com/siyuan-note/siyuan/issues/14820 https://github.com/siyuan-note/siyuan/issues/14820#issuecomment-2879645329
This commit is contained in:
parent
a0750bae8c
commit
886871001f
1 changed files with 3 additions and 0 deletions
|
|
@ -328,6 +328,9 @@ export class Toolbar {
|
|||
});
|
||||
if (this.range.startContainer.nodeType !== 3) {
|
||||
let emptyNode: Element = this.range.startContainer.childNodes[this.range.startOffset] as HTMLElement;
|
||||
if (!emptyNode) {
|
||||
emptyNode = this.range.startContainer.childNodes[this.range.startOffset - 1] as HTMLElement;
|
||||
}
|
||||
if (emptyNode && emptyNode.nodeType === 3) {
|
||||
if ((this.range.startContainer as HTMLElement).tagName === "DIV") {
|
||||
emptyNode = emptyNode.previousSibling as HTMLElement;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue