mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-02 19:00:15 +01:00
This commit is contained in:
parent
e3d2894a23
commit
2735e16d69
4 changed files with 27 additions and 13 deletions
|
|
@ -61,6 +61,13 @@ const moveToNew = (protyle: IProtyle, sourceElements: Element[], targetElement:
|
|||
topSourceElement = getTopAloneElement(item);
|
||||
if (topSourceElement.isSameNode(item)) {
|
||||
topSourceElement = undefined;
|
||||
// 单个缩放或反链面板中的列表项拖拽到包含该列表的编辑器中会导致残留的 list
|
||||
Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${item.getAttribute("data-node-id")}"]`)).find((targetItem: HTMLElement) => {
|
||||
if (!isInEmbedBlock(targetItem) && targetItem.parentElement.querySelectorAll(".li").length === 1) {
|
||||
topSourceElement = targetItem.parentElement;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
const copyId = Lute.NewNodeID();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue