From bd7d89e7cc1d3a39ffbec7c9c678b86752f1bc82 Mon Sep 17 00:00:00 2001
From: Samuel Mannehed <samuel@cendio.se>
Date: Fri, 10 Feb 2017 16:39:18 +0100
Subject: [PATCH] Fix resize on Chrome

Chrome sucks at calculating the size and gets confused due to the
scrollbars. Hide the scroll bars while resizing.
---
 app/ui.js | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/app/ui.js b/app/ui.js
index 29bfbd6..98bb5f6 100644
--- a/app/ui.js
+++ b/app/ui.js
@@ -1260,7 +1260,16 @@ var UI;
         // Gets the the size of the available viewport in the browser window
         screenSize: function() {
             var screen = document.getElementById('noVNC_screen');
-            return {w: screen.offsetWidth, h: screen.offsetHeight};
+            var width, height;
+
+            screen.style.overflow = "hidden";
+
+            width = screen.offsetWidth;
+            height = screen.offsetHeight;
+
+            screen.style.overflow = "auto";
+
+            return {w: width, h: height};
         },
 
         // Normally we only apply the current resize mode after a window resize
-- 
GitLab