Vanessa 2023-03-02 18:37:55 +08:00
parent a641862f30
commit afc792b476
2 changed files with 2 additions and 2 deletions

View file

@ -792,7 +792,6 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {
hideElements(["gutter"], protyle);
const targetClass = targetElement.className.split(" ");
targetElement.classList.remove("dragover__bottom", "dragover__top", "dragover__left", "dragover__right", "protyle-wysiwyg--select");
if (targetElement.className.indexOf("dragover__") === -1) {
// 拖拽到属性试图内
transaction(protyle, [{
@ -808,6 +807,7 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {
}]);
return;
}
targetElement.classList.remove("dragover__bottom", "dragover__top", "dragover__left", "dragover__right", "protyle-wysiwyg--select");
if (targetElement.parentElement.getAttribute("data-type") === "NodeSuperBlock" &&
targetElement.parentElement.getAttribute("data-sb-layout") === "col") {
if (targetClass.includes("dragover__left") || targetClass.includes("dragover__right")) {

View file

@ -233,7 +233,7 @@ export const globalShortcut = () => {
}
const target = event.target as Element;
const blockElement = hasClosestBlock(target);
const blockElement = hasClosestByClassName(target, "table");
if (blockElement && blockElement.style.cursor !== "col-resize" && !hasClosestByClassName(blockElement, "protyle-wysiwyg__embed")) {
const cellElement = (hasClosestByMatchTag(target, "TH") || hasClosestByMatchTag(target, "TD")) as HTMLTableCellElement;
if (cellElement) {