mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +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
Notes:
sideshowbarker
2024-07-17 18:45:56 +09:00
Author: https://github.com/awesomekling
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