Skip to content

Build your personal knowledge base with Trilium Notes

client/AI chat: fix dropdown positioning in the sidebar mode, while peeking

Adorian Doran528c1bca96f1
diff --git a/apps/client/src/widgets/sidebar/SidebarChat.tsx b/apps/client/src/widgets/sidebar/SidebarChat.tsx
index 988a627777..c93a19715c 100644
--- a/apps/client/src/widgets/sidebar/SidebarChat.tsx
+++ b/apps/client/src/widgets/sidebar/SidebarChat.tsx
@@ -313,6 +313,9 @@ export default function SidebarChat() {
hideToggleArrow
dropdownContainerClassName="tn-dropdown-menu-scrollable"
dropdownOptions={{ popperConfig: { strategy: "fixed" } }}
+ // In peek mode #right-pane has a backdrop-filter, which becomes the containing
+ // block for the fixed-positioned menu and offsets it — portal to body to escape it.
+ portalToBody
dropdownRef={historyDropdownRef}
onShown={loadRecentChats}
>
@@ -363,6 +366,9 @@ export default function SidebarChat() {
iconAction
hideToggleArrow
dropdownOptions={{ popperConfig: { strategy: "fixed" } }}
+ // See the history dropdown above: portal to body so peek mode's backdrop-filter
+ // containing block doesn't offset the fixed menu.
+ portalToBody
>
<FormListItem
icon="bx bx-save"