diff --git a/Userland/Libraries/LibWeb/Layout/Node.cpp b/Userland/Libraries/LibWeb/Layout/Node.cpp index 1342715d5b..ca474c7441 100644 --- a/Userland/Libraries/LibWeb/Layout/Node.cpp +++ b/Userland/Libraries/LibWeb/Layout/Node.cpp @@ -117,7 +117,7 @@ bool Node::establishes_stacking_context() const if (!has_style()) return false; - if (dom_node() == &document().root()) + if (is_root_element() || dom_node() == &document().root()) return true; auto position = computed_values().position();