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

View file

@ -94,6 +94,11 @@ export class Gutter {
return true;
}
});
if (avElement.querySelector('.block__icon[data-type="av-sort"]')?.classList.contains("block__icon--active")) {
event.preventDefault();
event.stopPropagation();
return;
}
const rowElement = avElement.querySelector(`.av__row[data-id="${buttonElement.dataset.rowId}"]`);
rowElement.classList.add("av__row--select");
rowElement.querySelector(".av__firstcol use").setAttribute("xlink:href", "#iconCheck");

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;