Vanessa 2025-07-07 15:41:34 +08:00
parent d6dfa68565
commit 3af20f3885
2 changed files with 10 additions and 0 deletions

View file

@ -855,6 +855,11 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {
} else if (target.classList.contains("av__gallery-item")) {
const blockElement = hasClosestBlock(target);
if (blockElement) {
if (blockElement.querySelector('.block__icon[data-type="av-sort"]')?.classList.contains("block__icon--active")) {
event.preventDefault();
event.stopPropagation();
return;
}
target.classList.add("av__gallery-item--select");
const ghostElement = document.createElement("div");
ghostElement.className = "protyle-wysiwyg protyle-wysiwyg--attr " + target.parentElement.className;