From ae552a91610e48e6cb0bc722641b838aa424a32c Mon Sep 17 00:00:00 2001 From: hanishkvc Date: Fri, 21 Nov 2025 16:22:01 +0530 Subject: [PATCH] SimpleChatTCRV:UIClean: Avoid wip popover anchor position mech Instead use the explicit positioning, which was already added to support firefox, given that firefox still doesnt support anchor based positioning. Also move the popover to top of the chat message bubble/block, instead of the bottom area. This ensures that the popover isnt butting heads with the tool call trigger or user input blocks. --- tools/server/public_simplechat/simplechat.css | 2 ++ tools/server/public_simplechat/simplechat.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/server/public_simplechat/simplechat.css b/tools/server/public_simplechat/simplechat.css index 3ae4301740..a949d644ce 100644 --- a/tools/server/public_simplechat/simplechat.css +++ b/tools/server/public_simplechat/simplechat.css @@ -136,9 +136,11 @@ body { } #popover-chatmsg { position:fixed; + /* position-area: span-top span-left; inset-block-start: anchor(start); inset-inline-start: anchor(center); + */ background-color: transparent; padding: 0; margin: 0; diff --git a/tools/server/public_simplechat/simplechat.js b/tools/server/public_simplechat/simplechat.js index a0847fd2b3..4d05f807ef 100644 --- a/tools/server/public_simplechat/simplechat.js +++ b/tools/server/public_simplechat/simplechat.js @@ -1324,7 +1324,7 @@ class MultiChatUI { // ALERT: helps account for firefox which doesnt support anchor based auto positioning currently let trect = secMain.getBoundingClientRect(); let prect = this.elPopoverChatMsg.getBoundingClientRect(); - this.elPopoverChatMsg.style.top = `${trect.bottom - (prect.height*1.2)}px` + this.elPopoverChatMsg.style.top = `${trect.top}px` this.elPopoverChatMsg.style.left = `${trect.width - (prect.width*1.2)}px` }) secMain.addEventListener('mouseleave', (ev)=>{