diff --git a/src/lib/components/layout/Sidebar/ChatItem.svelte b/src/lib/components/layout/Sidebar/ChatItem.svelte index 65569af1c6..d640e0efd3 100644 --- a/src/lib/components/layout/Sidebar/ChatItem.svelte +++ b/src/lib/components/layout/Sidebar/ChatItem.svelte @@ -3,6 +3,15 @@ const invisibleDragImage = new Image(); invisibleDragImage.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII='; + + /** + * At most one chat hover preview may be open across all ChatItem instances. + * bits-ui's safe-polygon close only re-evaluates on pointermove, so a + * preview can be left open when the pointer stops on a neighboring row + * while still inside the previous row's grace area; opening a preview + * therefore force-closes whichever one is still up. + */ + let closeActiveHoverPreview: (() => void) | null = null;