mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 10:00:13 +01:00
This commit is contained in:
parent
7a94ff581b
commit
0ab814f7e4
1 changed files with 2 additions and 2 deletions
|
|
@ -257,8 +257,8 @@ export class Toolbar {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 对已有字体样式的文字再次添加字体样式
|
// 对已有字体样式的文字再次添加字体样式
|
||||||
if (focusAdd && action === "add" && types.includes("bold") &&
|
if (focusAdd && action === "add" && types.includes("bold") && this.range.startContainer.nodeType === 3 &&
|
||||||
this.range.toString() === this.range.commonAncestorContainer.textContent) {
|
this.range.startContainer.parentNode.isSameNode(this.range.endContainer.parentNode)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let startElement = this.range.startContainer as Element;
|
let startElement = this.range.startContainer as Element;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue