Vanessa 2024-10-09 12:31:56 +08:00
parent a66cdff4f2
commit 97eb7de2c3
2 changed files with 9 additions and 7 deletions

View file

@ -14,7 +14,8 @@
}
&__container {
overflow: auto;
overflow-x: auto;
overflow-y: hidden;
cursor: auto;
}

View file

@ -306,6 +306,12 @@ export const cellScrollIntoView = (blockElement: HTMLElement, cellElement: Eleme
}
}
}
/// #if MOBILE
const contentElement = hasClosestByClassName(blockElement, "protyle-content", true);
if (contentElement) {
contentElement.scrollTop = contentElement.scrollTop + cellRect.top - 110;
}
/// #else
if (!blockElement.querySelector(".av__header")) {
// 属性面板
return;
@ -336,6 +342,7 @@ export const cellScrollIntoView = (blockElement: HTMLElement, cellElement: Eleme
}
}
}
/// #endif
};
export const getTypeByCellElement = (cellElement: Element) => {
@ -365,13 +372,7 @@ export const popTextCell = (protyle: IProtyle, cellElements: HTMLElement[], type
}
let cellRect = cellElements[0].getBoundingClientRect();
const contentElement = hasClosestByClassName(blockElement, "protyle-content", true);
/// #if MOBILE
if (contentElement) {
contentElement.scrollTop = contentElement.scrollTop + cellRect.top - 110;
}
/// #else
cellScrollIntoView(blockElement, cellElements[0], false);
/// #endif
cellRect = cellElements[0].getBoundingClientRect();
let html = "";
let height = cellRect.height;