Skip to content

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

Revert ":art: https://github.com/siyuan-note/siyuan/issues/14791"

Daniel22ecabe50917
diff --git a/app/src/protyle/render/av/openMenuPanel.ts b/app/src/protyle/render/av/openMenuPanel.ts
index b01f4f205a..33801bf540 100644
--- a/app/src/protyle/render/av/openMenuPanel.ts
+++ b/app/src/protyle/render/av/openMenuPanel.ts
@@ -222,22 +222,9 @@ export const openMenuPanel = (options: {
const inputElement = menuElement.querySelector("input");
if (inputElement) {
inputElement.select();
- inputElement.focus({preventScroll: true});
+ inputElement.focus();
}
- // 限制弹窗高度为单元格下方的可用空间,避免被 setPosition 推到顶部
- const belowHeight = window.innerHeight - cellRect.bottom - 4;
- const maxHeight = Math.min(Math.max(belowHeight, 100), window.innerHeight - 32);
- menuElement.style.maxHeight = maxHeight + "px";
setPosition(menuElement, cellRect.left, cellRect.bottom, cellRect.height);
- // 重置滚动位置到顶部
- const itemsElement = menuElement.lastElementChild as HTMLElement;
- if (itemsElement) {
- itemsElement.scrollTop = 0;
- const listElement = itemsElement.lastElementChild as HTMLElement;
- if (listElement) {
- listElement.scrollTop = 0;
- }
- }
}
} else {
setPosition(menuElement, tabRect.right - menuElement.clientWidth, tabRect.bottom, tabRect.height);