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.
This commit is contained in:
hanishkvc 2025-11-21 16:22:01 +05:30
parent 9d1c7b59a9
commit ae552a9161
2 changed files with 3 additions and 1 deletions

View File

@ -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;

View File

@ -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)=>{