diff --git a/app/src/constants.ts b/app/src/constants.ts index 7b8ad9715..cd46b2137 100644 --- a/app/src/constants.ts +++ b/app/src/constants.ts @@ -482,14 +482,7 @@ export abstract class Constants { "size": "auto", "type": "center", "instance": "Layout", - "children": [{ - "instance": "Wnd", - "children": [], - // "children": [{ - // "instance": "Tab", - // "children": [] - // }] - }] + "children": [{"instance": "Wnd", "children": [{"instance": "Tab", "children": []}]}] }, { "direction": "tb", "size": "0px", diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.ts index fd193793e..b712f0871 100644 --- a/app/src/protyle/util/editorCommonEvent.ts +++ b/app/src/protyle/util/editorCommonEvent.ts @@ -1056,9 +1056,10 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => { let dragoverElement: Element; let disabledPosition: string; editorElement.addEventListener("dragover", (event: DragEvent & { target: HTMLElement }) => { - if (protyle.disabled) { + if (protyle.disabled || event.dataTransfer.types.includes(Constants.SIYUAN_DROP_EDITOR)) { event.preventDefault(); event.stopPropagation(); + event.dataTransfer.dropEffect = "none"; return; } const contentRect = protyle.contentElement.getBoundingClientRect();