Skip to content

Commit 3f65251

Browse files
committed
🎨 #15178
1 parent 60d44fe commit 3f65251

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

app/src/protyle/wysiwyg/transaction.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,14 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, isUndo:
622622
}
623623
});
624624
if (data["data-av-type"]) {
625+
// https://github.com/siyuan-note/siyuan/pull/15178#discussion_r2173842215
626+
const oldAvType = item.getAttribute("data-av-type");
627+
const containerElement = item.querySelector(".av__container") as HTMLElement;
628+
if (containerElement && data["data-av-type"] === "table" && oldAvType === "gallery") {
629+
containerElement.style.overflow = "inherit";
630+
} else if (containerElement && data["data-av-type"] === "gallery" && oldAvType === "table") {
631+
containerElement.style.overflow = "";
632+
}
625633
item.setAttribute("data-av-type", data["data-av-type"]);
626634
}
627635
const attrElements = item.querySelectorAll(".protyle-attr");

0 commit comments

Comments
 (0)