Explorar o código

refac: floating buttons behaviour

Timothy J. Baek hai 7 meses
pai
achega
1fc1bf5f0d
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      src/lib/components/chat/Messages/ContentRenderer.svelte

+ 4 - 1
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();