Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset scroll #2842

Merged
merged 1 commit into from
Mar 23, 2020
Merged

Reset scroll #2842

merged 1 commit into from
Mar 23, 2020

Conversation

Alkarex
Copy link
Member

@Alkarex Alkarex commented Mar 23, 2020

Address some of #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.

Address some of FreshRSS#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.
@Alkarex Alkarex added this to the 1.16.0 milestone Mar 23, 2020
@Alkarex Alkarex added Important 🔥 UI 🎨 User Interfaces labels Mar 23, 2020
@@ -1542,6 +1542,7 @@ function init_normal() {
}

function init_beforeDOM() {
document.scrollingElement.scrollTop = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This actually works? Interesting. :-)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently yes, but more tests welcome :-)

@Alkarex Alkarex mentioned this pull request Mar 23, 2020
@yjfguhd
Copy link

yjfguhd commented Mar 23, 2020

Work for me in Firefox 68.6.0esr!

@Alkarex Alkarex merged commit 8fabed3 into FreshRSS:master Mar 23, 2020
@Alkarex Alkarex deleted the reset-scroll branch March 23, 2020 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants