1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:58:11 +00:00

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
parent 864f842dfe
commit d54a3f4520

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);