diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-05-29 14:55:24 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-05-29 14:55:24 +0300 |
commit | 1777c26a44daa5b87c7b88dd611008aaa59576eb (patch) | |
tree | f1a56a9ca3bb3b36cd17a2b330a25087b5b7df65 /src/ui | |
parent | 55e0f439cc4c32df2d280487031f789b63a9e287 (diff) |
DocumentWidget: Retain scroll position
Use scroll position from history when the page content wasn't in the cache.
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/documentwidget.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index a02e0bca..f37b2b6d 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -1599,6 +1599,10 @@ static iBool updateFromHistory_DocumentWidget_(iDocumentWidget *d) { | |||
1599 | else if (!isEmpty_String(d->mod.url)) { | 1599 | else if (!isEmpty_String(d->mod.url)) { |
1600 | fetch_DocumentWidget_(d); | 1600 | fetch_DocumentWidget_(d); |
1601 | } | 1601 | } |
1602 | if (recent) { | ||
1603 | /* Retain scroll position in refetched content as well. */ | ||
1604 | d->initNormScrollY = recent->normScrollY; | ||
1605 | } | ||
1602 | return iFalse; | 1606 | return iFalse; |
1603 | } | 1607 | } |
1604 | 1608 | ||