mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +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
|
|
@ -178,7 +178,7 @@ export class Outline extends Model {
|
|||
break;
|
||||
}
|
||||
break;
|
||||
} else if (this.blockId && (target.isSameNode(this.headerElement.nextElementSibling) || target.classList.contains("block__icons"))) {
|
||||
} else if (this.blockId && ((target === this.headerElement.nextElementSibling) || target.classList.contains("block__icons"))) {
|
||||
openFileById({
|
||||
app: options.app,
|
||||
id: this.blockId,
|
||||
|
|
@ -269,7 +269,7 @@ export class Outline extends Model {
|
|||
this.element.querySelectorAll(".dragover__top, .dragover__bottom, .dragover, .dragover__current").forEach(item => {
|
||||
item.classList.remove("dragover__top", "dragover__bottom", "dragover", "dragover__current");
|
||||
});
|
||||
if (selectItem.isSameNode(item)) {
|
||||
if (selectItem === item) {
|
||||
selectItem.classList.add("dragover__current");
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue