Index: tools/memory_inspector/memory_inspector/frontends/www_content/js/rootUi.js |
diff --git a/tools/memory_inspector/memory_inspector/frontends/www_content/js/rootUi.js b/tools/memory_inspector/memory_inspector/frontends/www_content/js/rootUi.js |
index bb4c80e7f0632983488535b0d24f4681129ae2ba..8e29546a926da4af2250b49a37b57f5bbdda27aa 100644 |
--- a/tools/memory_inspector/memory_inspector/frontends/www_content/js/rootUi.js |
+++ b/tools/memory_inspector/memory_inspector/frontends/www_content/js/rootUi.js |
@@ -4,6 +4,8 @@ |
rootUi = new (function() { |
+this.savedScrollTop_ = 0; |
+ |
this.onDomReady_ = function() { |
$('#js_loading_banner').hide(); |
$('#tabs').tabs({activate: this.onTabChange_.bind(this)}); |
@@ -84,6 +86,15 @@ this.onServerUnreachableOrTimeout = function() { |
'It probably crashed, Check the terminal output.'); |
}; |
+// Sad hack required to work around a Google Table bug (goo.gl/TXr3vL). |
+this.saveScrollPosition = function() { |
+ this.savedScrollTop_ = $('#wrapper').scrollTop(); |
+}; |
+ |
+this.restoreScrollPosition = function() { |
+ $('#wrapper').scrollTop(this.savedScrollTop_); |
+}; |
+ |
$(document).ready(this.onDomReady_.bind(this)); |
})(); |