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.
This commit is contained in:
sholm 2022-01-09 19:31:38 +01:00 committed by Linus Groh
commit d54a3f4520
Notes: sideshowbarker 2024-07-17 21:18:39 +09:00

View file

@ -160,6 +160,7 @@ ErrorOr<int> 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);