diff --git a/plugins/remote-desktop/src/frontend/GuacamoleDisplay.tsx b/plugins/remote-desktop/src/frontend/GuacamoleDisplay.tsx index ed09526b7..719b69c7c 100644 --- a/plugins/remote-desktop/src/frontend/GuacamoleDisplay.tsx +++ b/plugins/remote-desktop/src/frontend/GuacamoleDisplay.tsx @@ -815,28 +815,6 @@ export const GuacamoleDisplay = forwardRef< rescaleDisplay, ]); - const syncClipboard = useCallback(() => { - const client = clientRef.current; - if (!client || !navigator.clipboard?.readText) return; - navigator.clipboard - .readText() - .then((text) => { - if (text) { - const stream = client.createClipboardStream("text/plain"); - const writer = new Guacamole.StringWriter(stream); - writer.sendText(text); - writer.sendEnd(); - } - }) - .catch(() => {}); - }, []); - - useEffect(() => { - if (isVisible && isReady) { - syncClipboard(); - } - }, [isVisible, isReady, syncClipboard]); - useEffect(() => { const container = containerRef.current; const protocol = connectionConfig.protocol ?? connectionConfig.type; @@ -882,18 +860,6 @@ export const GuacamoleDisplay = forwardRef< }; }, [applyZoom, connectionConfig.protocol, connectionConfig.type, isReady]); - useEffect(() => { - const container = containerRef.current; - if (!container || !isReady) return; - - const handleFocus = () => syncClipboard(); - container.addEventListener("mouseenter", handleFocus); - - return () => { - container.removeEventListener("mouseenter", handleFocus); - }; - }, [isReady, syncClipboard]); - const canDropFiles = allowUpload && onDropFiles != null; const [isDraggingFiles, setIsDraggingFiles] = useState(false); // Nested elements fire dragleave as the pointer crosses them, so track depth