Pārlūkot izejas kodu

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.
Andreas Kling 3 gadi atpakaļ
vecāks
revīzija
4708a65160

+ 1 - 1
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())
     if (!element || !element->layout_node())
         return;
         return;