diff options
| author | 2020-03-23 22:29:26 +0100 | |
|---|---|---|
| committer | 2020-03-23 22:29:26 +0100 | |
| commit | 8fabed337a6a11d61e2ac969acc9690d296f8cb6 (patch) | |
| tree | b5cd2068c58b7d2cb38790c56279c8e338186d78 /p/scripts | |
| parent | daa4922d908fb9ad5d973c597d0c60f769236c3e (diff) | |
Reset scroll (#2842)
Address some of https://github.com/FreshRSS/FreshRSS/issues/2836
This patch resets the scrollbar to the top when a FreshRSS page is
initialised.
Makes sure that when a FreshRSS page is restored in a Web browser
session, we do not hit the problematic situation when the content is
refreshed but the scrollbar moved back to where it was, potentially
erroneously marking as read many as read, of landing on the wrong focus.
Diffstat (limited to 'p/scripts')
| -rw-r--r-- | p/scripts/main.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js index 6b4b0a6b2..6143692eb 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -1542,6 +1542,7 @@ function init_normal() { } function init_beforeDOM() { + document.scrollingElement.scrollTop = 0; if (['normal', 'reader', 'global'].indexOf(context.current_view) >= 0) { init_normal(); } |
