GUAC-698: Record last adjusted display metrics before reflowing and possibly affecting those metrics.

This commit is contained in:
Michael Jumper
2014-05-19 19:13:26 -07:00
parent 51b12d11c9
commit 58e828bf2d

View File

@@ -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;
}
}