From 9fd9ce1f9e0ddfcd5ab7438250dd6277fd27aadb Mon Sep 17 00:00:00 2001 From: davidot Date: Tue, 2 Mar 2021 17:05:17 +0100 Subject: LibWeb: Stop scrolling above content in BlockBox --- Userland/Libraries/LibWeb/Layout/BlockBox.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Layout/BlockBox.cpp b/Userland/Libraries/LibWeb/Layout/BlockBox.cpp index 5a9f2b5c43..53020e2812 100644 --- a/Userland/Libraries/LibWeb/Layout/BlockBox.cpp +++ b/Userland/Libraries/LibWeb/Layout/BlockBox.cpp @@ -150,7 +150,8 @@ bool BlockBox::is_scrollable() const void BlockBox::set_scroll_offset(const Gfx::FloatPoint& offset) { - if (m_scroll_offset == offset) + // FIXME: If there is horizontal and vertical scroll ignore only part of the new offset + if (offset.y() < 0 || m_scroll_offset == offset) return; m_scroll_offset = offset; set_needs_display(); -- cgit v1.2.3