Fix scrollbars for full-size VNC view

- Allow container to expand with height: auto and max-height: none in full-size mode
- Set min-width and min-height to fit-content for #noVNC_screen to allow proper canvas sizing
- Add debugging logs to check canvas and container dimensions after zoom toggle
- Ensure scrollbars appear when remote desktop is larger than viewport
parent ba54ead0
...@@ -65,6 +65,12 @@ ...@@ -65,6 +65,12 @@
} }
.vnc-container.full-size { .vnc-container.full-size {
overflow: auto; overflow: auto;
max-height: none;
height: auto;
}
.vnc-container.full-size #noVNC_screen {
min-width: fit-content;
min-height: fit-content;
} }
/* GNOME-like window decorations */ /* GNOME-like window decorations */
.vnc-window { .vnc-window {
...@@ -309,6 +315,15 @@ function toggleZoom() { ...@@ -309,6 +315,15 @@ function toggleZoom() {
rfb.scaleViewport = false; rfb.scaleViewport = false;
rfb.clipViewport = true; rfb.clipViewport = true;
// Force a resize to ensure canvas is properly sized for scrolling
setTimeout(() => {
const canvas = document.querySelector('#noVNC_screen canvas');
if (canvas) {
console.log('Canvas size after zoom toggle:', canvas.width, 'x', canvas.height);
console.log('Container size:', vncContainer.clientWidth, 'x', vncContainer.clientHeight);
}
}, 100);
showNotification('Switched to actual size view with scrollbars', 'info'); showNotification('Switched to actual size view with scrollbars', 'info');
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment