Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: Prevent mobile database field menus from jumping the document https://github.com/siyuan-note/siyuan/issues/18845

Danielb74bc3a5182f
diff --git a/app/src/protyle/render/av/col.ts b/app/src/protyle/render/av/col.ts
index 3d1949d778..80fe398f1b 100644
--- a/app/src/protyle/render/av/col.ts
+++ b/app/src/protyle/render/av/col.ts
@@ -24,6 +24,9 @@ import {createEmptyAVValue, genAVAttributeRowHTML} from "./attributeValue";
import {getAVColumnTextMeasurer, getAVDistributedColumnWidth, getAVTableFitWidths} from "./columnWidth";
import {getAVData} from "./virtualScroll";
import {getAVColorStyle, getNextAVOptionColor} from "./color";
+/// #if MOBILE
+import {activeBlur} from "../../../mobile/util/keyboardToolbar";
+/// #endif
export const getColId = (element: Element, viewType: TAVView) => {
if (viewType === "table" || hasClosestByClassName(element, "custom-attr")) {
@@ -1545,6 +1548,9 @@ const genUpdateColItem = (type: TAVCol, oldType: TAVCol) => {
};
export const addCol = (protyle: IProtyle, blockElement: Element, previousID?: string) => {
+ /// #if MOBILE
+ activeBlur();
+ /// #endif
const menu = new Menu(Constants.MENU_AV_HEADER_ADD);
const avID = blockElement.getAttribute("data-av-id");
if (typeof previousID === "undefined" && blockElement.getAttribute("data-av-type") === "table") {