From d54a3f45204a3399ef9484457f35cef802e57885 Mon Sep 17 00:00:00 2001 From: sholm Date: Sun, 9 Jan 2022 19:31:38 +0100 Subject: [PATCH] Help: Scroll to the top of page when opening a new link Previously the scroll position would not reset when loading a new page. This caused various problems such as opening the page at the previous pages scroll position and in some instances not even showing the new page at all. --- Userland/Applications/Help/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Userland/Applications/Help/main.cpp b/Userland/Applications/Help/main.cpp index afebffbfd3..e34d7dc855 100644 --- a/Userland/Applications/Help/main.cpp +++ b/Userland/Applications/Help/main.cpp @@ -160,6 +160,7 @@ ErrorOr serenity_main(Main::Arguments arguments) auto url = URL::create_with_file_protocol(path); page_view->load_html(html, url); + page_view->scroll_to_top(); app->deferred_invoke([&, path] { auto tree_view_index = manual_model->index_from_path(path);