diff options
author | Andreas Kling <kling@serenityos.org> | 2022-02-15 14:12:23 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-15 14:14:02 +0100 |
commit | 4708a65160f913e46efdf263d371723280a9c7d3 (patch) | |
tree | 6851eda7e38cf27b29e748147eb4d3deb23c1a61 /Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp | |
parent | 1b2e1c19e124502049c3888bf2ebb234d9a0a65e (diff) | |
download | serenity-4708a65160f913e46efdf263d371723280a9c7d3.zip |
LibWeb: Force a relayout when scrolling to anchor
This ensures that the layout information is current, even when the
scroll request happens immediately upon page load.
This fixes an issue where reloading ACID2 wouldn't scroll down to the
"#top" anchor point.
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp b/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp index 285aef278e..d21a107ff1 100644 --- a/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp +++ b/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp @@ -164,7 +164,7 @@ void BrowsingContext::scroll_to_anchor(String const& fragment) } } - active_document()->update_layout(); + active_document()->force_layout(); if (!element || !element->layout_node()) return; |