From 58e828bf2de8502cbf8d871ac0d66ba10408a478 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Mon, 19 May 2014 19:13:26 -0700 Subject: [PATCH] GUAC-698: Record last adjusted display metrics before reflowing and possibly affecting those metrics. --- guacamole/src/main/webapp/scripts/client-ui.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/guacamole/src/main/webapp/scripts/client-ui.js b/guacamole/src/main/webapp/scripts/client-ui.js index 2bf730b96..62e6dac21 100644 --- a/guacamole/src/main/webapp/scripts/client-ui.js +++ b/guacamole/src/main/webapp/scripts/client-ui.js @@ -1585,6 +1585,11 @@ GuacUI.Client.attach = function(guac) { || window.innerWidth != last_width || window.innerHeight != last_height) { + last_scroll_top = document.body.scrollTop; + last_scroll_left = document.body.scrollLeft; + last_width = window.innerWidth; + last_height = window.innerHeight; + // Reposition document such that it's back on-screen window.scrollTo(document.body.scrollWidth, document.body.scrollHeight); @@ -1621,11 +1626,6 @@ GuacUI.Client.attach = function(guac) { // Rescale display appropriately GuacUI.Client.updateDisplayScale(); - last_scroll_top = document.body.scrollTop; - last_scroll_left = document.body.scrollLeft; - last_width = window.innerWidth; - last_height = window.innerHeight; - } }