diff options
author | davidot <david.tuin@gmail.com> | 2021-03-02 17:05:17 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-03 21:48:51 +0100 |
commit | 9fd9ce1f9e0ddfcd5ab7438250dd6277fd27aadb (patch) | |
tree | dc0f5ad6190501ce741cf5fad7bcdd43acfcbb1d | |
parent | 157af93d696a723fd46123f5d3696927b4216ef8 (diff) | |
download | serenity-9fd9ce1f9e0ddfcd5ab7438250dd6277fd27aadb.zip |
LibWeb: Stop scrolling above content in BlockBox
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/BlockBox.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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(); |