aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/main.js
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-03-26 10:43:09 +0100
committerMario Vavti <mario@mariovavti.com>2015-03-26 10:43:09 +0100
commita5f410d587c350f26f9255e115260851551d2a15 (patch)
treeaa2fe8399d3008c095bcdf77b658b2dbd46bb2ec /view/js/main.js
parente0a0fc507f3d070a69ad5033d6baad5e1d406888 (diff)
downloadvolse-hubzilla-a5f410d587c350f26f9255e115260851551d2a15.tar.gz
volse-hubzilla-a5f410d587c350f26f9255e115260851551d2a15.tar.bz2
volse-hubzilla-a5f410d587c350f26f9255e115260851551d2a15.zip
this might stop page scrolls while new updates drop in
Diffstat (limited to 'view/js/main.js')
-rw-r--r--view/js/main.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 4a7db0fdb..f6bc22e34 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -666,8 +666,10 @@ function liveUpdate() {
else
update_mode = 'append';
}
- else
+ else {
update_mode = 'update';
+ var orgHeight = $("#region_2").height();
+ }
$.get(update_url, function(data) {
page_load = false;
@@ -676,6 +678,10 @@ function liveUpdate() {
$("#page-spinner").spin(false);
$("#profile-jot-text-loading").spin(false);
+ if(update_mode === 'update') {
+ $(window).scrollTop($(window).scrollTop() + $("#region_2").height() - orgHeight);
+ }
+
in_progress = false;
// FIXME - the following lines were added so that almost