mirror of
https://github.com/swisspol/GCDWebServer.git
synced 2024-10-07 08:12:26 +08:00
Force preserve scrolling position
This commit is contained in:
parent
cedeb88cb6
commit
252c38c42a
@ -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();
|
||||
@ -169,6 +170,7 @@ function _reload(path) {
|
||||
});
|
||||
});
|
||||
|
||||
$(document).scrollTop(scrollPosition);
|
||||
}).always(function() {
|
||||
_enableReloads();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user