diff --git a/src/lib/components/chat/Messages/ContentRenderer.svelte b/src/lib/components/chat/Messages/ContentRenderer.svelte index 0aede00652..f0660d5230 100644 --- a/src/lib/components/chat/Messages/ContentRenderer.svelte +++ b/src/lib/components/chat/Messages/ContentRenderer.svelte @@ -27,7 +27,10 @@ await tick(); // Check if the event target is within the content container - if (!contentContainerElement?.contains(event.target)) return; + if (!contentContainerElement?.contains(event.target)) { + closeFloatingButtons(); + return; + } let selection = window.getSelection();