diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts index f4e531d81..2f95aa57f 100644 --- a/app/src/protyle/gutter/index.ts +++ b/app/src/protyle/gutter/index.ts @@ -148,7 +148,7 @@ export class Gutter { buttonElement.style.opacity = "0.1"; window.siyuan.dragElement = avElement as HTMLElement || protyle.wysiwyg.element; - event.dataTransfer.setData(`${Constants.SIYUAN_DROP_GUTTER}${buttonElement.getAttribute("data-type")}${Constants.ZWSP}${buttonElement.getAttribute("data-subtype")}${Constants.ZWSP}${selectIds}`, + event.dataTransfer.setData(`${Constants.SIYUAN_DROP_GUTTER}${buttonElement.getAttribute("data-type")}${Constants.ZWSP}${buttonElement.getAttribute("data-subtype")}${Constants.ZWSP}${selectIds}${Constants.ZWSP}${window.siyuan.config.system.workspaceDir}`, protyle.wysiwyg.element.innerHTML); }); this.element.addEventListener("dragend", () => { diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.ts index a4a712690..42a1d8f19 100644 --- a/app/src/protyle/util/editorCommonEvent.ts +++ b/app/src/protyle/util/editorCommonEvent.ts @@ -895,7 +895,9 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => { sourceElements.push(elementItem); } }); - } else { // 跨窗口拖拽 + } else if (window.siyuan.config.system.workspaceDir.toLowerCase() === gutterTypes[3]) { + // 跨窗口拖拽 + // 不能跨工作区域拖拽 https://github.com/siyuan-note/siyuan/issues/13582 const targetProtyleElement = document.createElement("template"); targetProtyleElement.innerHTML = `