mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-10 17:24:21 +01:00
Replace the deprecated isSameNode method in DOM Level 4 with the === operator (#15347)
This commit is contained in:
parent
a730a575d5
commit
c88f99646c
51 changed files with 160 additions and 160 deletions
|
|
@ -403,7 +403,7 @@ export const insertHTML = (html: string, protyle: IProtyle, isBlock = false,
|
|||
}
|
||||
// 粘贴带样式的行内元素到另一个行内元素中需进行切割
|
||||
const spanElement = range.startContainer.nodeType === 3 ? range.startContainer.parentElement : range.startContainer as HTMLElement;
|
||||
if (spanElement.tagName === "SPAN" && spanElement.isSameNode(range.endContainer.nodeType === 3 ? range.endContainer.parentElement : range.endContainer) &&
|
||||
if (spanElement.tagName === "SPAN" && (spanElement === (range.endContainer.nodeType === 3 ? range.endContainer.parentElement : range.endContainer)) &&
|
||||
// 粘贴纯文本不需切割 https://ld246.com/article/1665556907936
|
||||
// emoji 图片需要切割 https://github.com/siyuan-note/siyuan/issues/9370
|
||||
tempElement.content.querySelector("span, img")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue