mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-03 23:38:49 +01:00
This commit is contained in:
parent
a66cdff4f2
commit
97eb7de2c3
2 changed files with 9 additions and 7 deletions
|
|
@ -14,7 +14,8 @@
|
|||
}
|
||||
|
||||
&__container {
|
||||
overflow: auto;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
cursor: auto;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue