Ver código fonte

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.
sholm 3 anos atrás
pai
commit
d54a3f4520
1 arquivos alterados com 1 adições e 0 exclusões
  1. 1 0
      Userland/Applications/Help/main.cpp

+ 1 - 0
Userland/Applications/Help/main.cpp

@@ -160,6 +160,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
 
 
         auto url = URL::create_with_file_protocol(path);
         auto url = URL::create_with_file_protocol(path);
         page_view->load_html(html, url);
         page_view->load_html(html, url);
+        page_view->scroll_to_top();
 
 
         app->deferred_invoke([&, path] {
         app->deferred_invoke([&, path] {
             auto tree_view_index = manual_model->index_from_path(path);
             auto tree_view_index = manual_model->index_from_path(path);