This commit is contained in:
parent
2cf0b09282
commit
d081e3cad0
5 changed files with 5 additions and 0 deletions
|
@ -223,6 +223,7 @@ export class Wnd {
|
|||
this.headersElement.parentElement.addEventListener("drop", function (event: DragEvent & {
|
||||
target: HTMLElement
|
||||
}) {
|
||||
headerDragCounter = 0;
|
||||
const it = this as HTMLElement;
|
||||
if (event.dataTransfer.types.includes(Constants.SIYUAN_DROP_FILE)) {
|
||||
// 文档树拖拽
|
||||
|
|
|
@ -526,6 +526,7 @@ export class Files extends Model {
|
|||
counter++;
|
||||
});
|
||||
this.element.addEventListener("drop", async (event: DragEvent & { target: HTMLElement }) => {
|
||||
counter = 0;
|
||||
const newElement = this.element.querySelector(".dragover, .dragover__bottom, .dragover__top");
|
||||
if (!newElement) {
|
||||
return;
|
||||
|
|
|
@ -221,6 +221,7 @@ class="fn__flex-1 fn__flex${["url", "text", "number", "email", "phone", "block"]
|
|||
});
|
||||
});
|
||||
element.addEventListener("drop", () => {
|
||||
counter = 0;
|
||||
window.siyuan.dragElement.style.opacity = "";
|
||||
const targetElement = element.querySelector(".dragover__bottom, .dragover__top") as HTMLElement;
|
||||
if (targetElement && dragBlockElement) {
|
||||
|
|
|
@ -181,6 +181,7 @@ export const openMenuPanel = (options: {
|
|||
return;
|
||||
});
|
||||
avPanelElement.addEventListener("drop", (event) => {
|
||||
counter = 0;
|
||||
if (!window.siyuan.dragElement) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
|
|
@ -784,6 +784,7 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
document.onmouseup = null;
|
||||
});
|
||||
editorElement.addEventListener("drop", async (event: DragEvent & { target: HTMLElement }) => {
|
||||
counter = 0;
|
||||
if (protyle.disabled || event.dataTransfer.getData(Constants.SIYUAN_DROP_EDITOR)) {
|
||||
// 只读模式/编辑器内选中文字拖拽
|
||||
event.preventDefault();
|
||||
|
|
Loading…
Add table
Reference in a new issue