🎨 移动端数据库单元格修改

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2026-02-07 00:45:11 +08:00
parent 9fd1bf7b96
commit 66aa94568e
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 11 additions and 6 deletions

View file

@ -418,7 +418,16 @@ export const cellScrollIntoView = (blockElement: HTMLElement, cellElement: Eleme
/// #if MOBILE
const contentElement = hasClosestByClassName(blockElement, "protyle-content", true);
if (contentElement && cellElement.getAttribute("data-dtype") !== "checkbox") {
const keyboardToolbarTop = (window.siyuan.mobile.size.isLandscape ? window.siyuan.mobile.size.landscape.height2 : window.siyuan.mobile.size.portrait.height2) - 48;
let keyboardToolbarTop = window.innerHeight / 2 - 48;
if (window.siyuan.mobile.size.isLandscape) {
if (window.siyuan.mobile.size.landscape.height1 !== window.siyuan.mobile.size.landscape.height2) {
keyboardToolbarTop = window.siyuan.mobile.size.landscape.height2 - 48;
}
} else {
if (window.siyuan.mobile.size.portrait.height1 !== window.siyuan.mobile.size.portrait.height2) {
keyboardToolbarTop = window.siyuan.mobile.size.portrait.height2 - 48;
}
}
if (cellRect.bottom > keyboardToolbarTop) {
contentElement.scrollTop = contentElement.scrollTop + (cellRect.bottom - keyboardToolbarTop);
} else if (cellRect.top < 110) {

View file

@ -333,11 +333,7 @@ export const getPadding = (protyle: IProtyle) => {
let left = 24;
let bottom = 16;
if (protyle.options.typewriterMode) {
if (isMobile()) {
bottom = window.innerHeight / 5;
} else {
bottom = protyle.element.clientHeight / 2;
}
bottom = protyle.element.clientHeight / 2;
}
if (!isMobile()) {
let isFullWidth = protyle.wysiwyg.element.getAttribute(Constants.CUSTOM_SY_FULLWIDTH);