mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:58:11 +00:00
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.
This commit is contained in:
parent
1b2e1c19e1
commit
4708a65160
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue