mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-07-15 04:43:36 +00:00
fix: rdp fails with readText undefined error
This commit is contained in:
@@ -383,7 +383,7 @@ export const GuacamoleDisplay = forwardRef<
|
|||||||
data += text;
|
data += text;
|
||||||
};
|
};
|
||||||
reader.onend = () => {
|
reader.onend = () => {
|
||||||
navigator.clipboard.writeText(data).catch(() => {});
|
navigator.clipboard?.writeText?.(data).catch(() => {});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -502,7 +502,7 @@ export const GuacamoleDisplay = forwardRef<
|
|||||||
|
|
||||||
const syncClipboard = useCallback(() => {
|
const syncClipboard = useCallback(() => {
|
||||||
const client = clientRef.current;
|
const client = clientRef.current;
|
||||||
if (!client) return;
|
if (!client || !navigator.clipboard?.readText) return;
|
||||||
navigator.clipboard
|
navigator.clipboard
|
||||||
.readText()
|
.readText()
|
||||||
.then((text) => {
|
.then((text) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user