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:
parent
864f842dfe
commit
d54a3f4520
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue