From 577bd45ba5bd2e1bfcbba655d69114a027a9a105 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 20 Nov 2025 08:49:06 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/16372 --- app/src/protyle/hint/index.ts | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/app/src/protyle/hint/index.ts b/app/src/protyle/hint/index.ts index 30603097c..35453b32b 100644 --- a/app/src/protyle/hint/index.ts +++ b/app/src/protyle/hint/index.ts @@ -209,8 +209,24 @@ ${unicode2Emoji(emoji.unicode)}`; if (this.element.classList.contains("fn__none")) { this.element.innerHTML = '
'; this.element.classList.remove("fn__none"); - const textareaPosition = getSelectionPosition(protyle.wysiwyg.element); - setPosition(this.element, textareaPosition.left, textareaPosition.top + 26, 30); + if (this.source === "av") { + const cellElement = hasClosestByClassName(protyle.toolbar.range.startContainer, "av__cell"); + if (cellElement) { + /// #if !MOBILE + const cellRect = cellElement.getBoundingClientRect(); + setPosition(this.element, cellRect.left, cellRect.bottom, cellRect.height); + /// #else + setPosition(this.element, 0, 0); + /// #endif + } + } else { + /// #if !MOBILE + const textareaPosition = getSelectionPosition(protyle.wysiwyg.element); + setPosition(this.element, textareaPosition.left, textareaPosition.top + 26, 30); + /// #else + setPosition(this.element, 0, 0); + /// #endif + } } else { this.element.insertAdjacentHTML("beforeend", '
'); }