Scroll correct element
The element we want scrolling around is noVNC_screen, not the entire window. This also allows us to compute the screen size without fiddling the scrollbars on and off.
This commit is contained in:
parent
2e6a58fb15
commit
648c83984c
|
@ -798,6 +798,7 @@ input[type=button]:active, select:active {
|
|||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
background-color: rgb(40, 40, 40);
|
||||
}
|
||||
:root:not(.noVNC_connected) #noVNC_screen {
|
||||
|
|
16
app/ui.js
16
app/ui.js
|
@ -1259,21 +1259,7 @@ var UI;
|
|||
// Gets the the size of the available viewport in the browser window
|
||||
screenSize: function() {
|
||||
var screen = document.getElementById('noVNC_screen');
|
||||
|
||||
// Hide the scrollbars until the size is calculated
|
||||
screen.style.overflow = "hidden";
|
||||
|
||||
var pos = Util.getPosition(screen);
|
||||
var w = pos.width;
|
||||
var h = pos.height;
|
||||
|
||||
screen.style.overflow = "visible";
|
||||
|
||||
if (isNaN(w) || isNaN(h)) {
|
||||
return false;
|
||||
} else {
|
||||
return {w: w, h: h};
|
||||
}
|
||||
return {w: screen.offsetWidth, h: screen.offsetHeight};
|
||||
},
|
||||
|
||||
// Normally we only apply the current resize mode after a window resize
|
||||
|
|
Loading…
Reference in New Issue