fix(remote-desktop): clip cursor overflow without disabling zoom (#1535)

This commit is contained in:
ZacharyZcR authored and GitHub committed 2026-10-03 21:00:20 +08:00
1 parent 93db4799c0
commit dc6c522782
1 file changed
+3 -3
@@ -176,8 +176,8 @@ export const GuacamoleDisplay = forwardRef<
const scale = fitScaleRef.current * zoom;
scaleRef.current = scale;
display.scale(scale);
displayRef.current.style.width = `${display.getWidth() * scale}px`;
displayRef.current.style.height = `${display.getHeight() * scale}px`;
displayRef.current.style.width = `${Math.floor(display.getWidth() * scale)}px`;
displayRef.current.style.height = `${Math.floor(display.getHeight() * scale)}px`;
}
onZoomChange?.(zoom);
return zoom;
@@ -904,7 +904,7 @@ export const GuacamoleDisplay = forwardRef<
>
<div
ref={displayRef}
className="relative flex min-h-full min-w-full items-center justify-center"
className="relative flex min-h-full min-w-full items-center justify-center overflow-hidden"
style={{
cursor: isReady ? "none" : "default",
visibility: isReady ? "visible" : "hidden",