mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-20 23:36:10 +01:00
This commit is contained in:
parent
4b66872eb0
commit
b0602bc940
1 changed files with 6 additions and 1 deletions
|
|
@ -2396,7 +2396,12 @@ export class WYSIWYG {
|
|||
|
||||
setTimeout(() => {
|
||||
// 选中后,在选中的文字上点击需等待 range 更新
|
||||
const newRange = getEditorRange(this.element);
|
||||
let newRange = getEditorRange(this.element);
|
||||
// https://github.com/siyuan-note/siyuan/issues/10357
|
||||
const attrElement = hasClosestByClassName(newRange.endContainer, "protyle-attr")
|
||||
if (attrElement) {
|
||||
newRange = setLastNodeRange(attrElement.previousElementSibling, newRange, false);
|
||||
}
|
||||
/// #if !MOBILE
|
||||
if (newRange.toString().replace(Constants.ZWSP, "") !== "") {
|
||||
protyle.toolbar.render(protyle, newRange);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue