Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Force preserve scrolling position
Browse files Browse the repository at this point in the history
  • Loading branch information
swisspol committed Apr 14, 2014
1 parent cedeb88 commit 252c38c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions GCDWebUploader/GCDWebUploader.bundle/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ function _reload(path) {
}).fail(function(jqXHR, textStatus, errorThrown) {
_showError("Failed retrieving contents of \"" + path + "\"", textStatus, errorThrown);
}).done(function(data, textStatus, jqXHR) {
var scrollPosition = $(document).scrollTop();

if (path != _path) {
$("#path").empty();
Expand Down Expand Up @@ -169,6 +170,7 @@ function _reload(path) {
});
});

$(document).scrollTop(scrollPosition);
}).always(function() {
_enableReloads();
});
Expand Down

0 comments on commit 252c38c

Please sign in to comment.