From 41fcb61908956f2915f992d0643ed1a23dbd1236 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 10 Jul 2023 10:40:29 +0800 Subject: [PATCH] :sparkles: https://github.com/siyuan-note/siyuan/issues/8694 --- app/appearance/icons/index.html | 2 +- app/src/protyle/render/av/openMenuPanel.ts | 6 +++--- app/src/protyle/render/av/select.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/appearance/icons/index.html b/app/appearance/icons/index.html index bef62b565..e140709ed 100644 --- a/app/appearance/icons/index.html +++ b/app/appearance/icons/index.html @@ -1097,6 +1097,6 @@ iconSub - + diff --git a/app/src/protyle/render/av/openMenuPanel.ts b/app/src/protyle/render/av/openMenuPanel.ts index d1d106502..e16a597a1 100644 --- a/app/src/protyle/render/av/openMenuPanel.ts +++ b/app/src/protyle/render/av/openMenuPanel.ts @@ -67,7 +67,7 @@ export const openMenuPanel = (protyle: IProtyle, return; } const target = event.target as HTMLElement; - const targetElement = hasClosestByAttribute(target, "data-id", null); + const targetElement = hasClosestByAttribute(target, "draggable", "true"); if (!targetElement || (!targetElement.classList.contains("dragover__top") && !targetElement.classList.contains("dragover__bottom"))) { return; @@ -154,7 +154,7 @@ export const openMenuPanel = (protyle: IProtyle, let dragoverElement: HTMLElement; avPanelElement.addEventListener("dragover", (event: DragEvent) => { const target = event.target as HTMLElement; - const targetElement = hasClosestByAttribute(target, "data-id", null); + const targetElement = hasClosestByAttribute(target, "draggable", "true"); if (!targetElement || targetElement.isSameNode(window.siyuan.dragElement)) { return; } @@ -172,7 +172,7 @@ export const openMenuPanel = (protyle: IProtyle, }); avPanelElement.addEventListener("dragleave", (event) => { const target = event.target as HTMLElement; - const targetElement = hasClosestByAttribute(target, "data-id", null); + const targetElement = hasClosestByAttribute(target, "draggable", "true"); if (targetElement) { targetElement.classList.remove("dragover__top", "dragover__bottom"); } diff --git a/app/src/protyle/render/av/select.ts b/app/src/protyle/render/av/select.ts index c95129fa5..59ee2e5a7 100644 --- a/app/src/protyle/render/av/select.ts +++ b/app/src/protyle/render/av/select.ts @@ -185,7 +185,7 @@ export const setSelectCol = (protyle: IProtyle, data: IAV, options: { menu.addSeparator(); Array.from(Array(13).keys()).forEach(index => { menu.addItem({ - current: parseInt(color) === index + 1, + accelerator: parseInt(color) === index + 1 ? '' : undefined, iconHTML: "", label: `A`, click() {