fix: 拖拽块的时候错误地高亮了对应的嵌入块内容 (#13981)

fix https://github.com/siyuan-note/siyuan/issues/13948
This commit is contained in:
Jeffrey Chen 2025-02-02 17:21:40 +08:00 committed by GitHub
parent 12842e50d6
commit f0e3ba42bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -114,7 +114,13 @@ export class Gutter {
selectIds.push(itemId);
}));
if (!selectedIncludeGutter) {
const gutterNodeElement = protyle.wysiwyg.element.querySelector(`[data-node-id="${gutterId}"]`);
let gutterNodeElement;
Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${gutterId}"]`)).find(item => {
if (!isInEmbedBlock(item) && this.isMatchNode(item)) {
gutterNodeElement = item;
return true;
}
});
if (gutterNodeElement) {
selectElements.forEach((item => {
item.classList.remove("protyle-wysiwyg--select");