mirror of
https://github.com/novnc/noVNC.git
synced 2026-05-26 23:19:41 +00:00
Fix resize on Chrome
Chrome sucks at calculating the size and gets confused due to the scrollbars. Hide the scroll bars while resizing.
This commit is contained in:
11
app/ui.js
11
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
|
||||
|
||||
Reference in New Issue
Block a user