diff --git a/app/styles/base.css b/app/styles/base.css index 323b6d35b5d8e6b3ceb50d8b0d565222f37054f8..0518acc46ffad047e6a0836c8a19574e3101c3f3 100644 --- a/app/styles/base.css +++ b/app/styles/base.css @@ -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 { diff --git a/app/ui.js b/app/ui.js index d51d9195c0d43a6de858339a41ceeab1a47659ee..47263555ff02a2b80f1d6dd5aedf0889a26c4a32 100644 --- a/app/ui.js +++ b/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