1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:37:46 +00:00

LibWeb: Stop scrolling above content in BlockBox

This commit is contained in:
davidot 2021-03-02 17:05:17 +01:00 committed by Andreas Kling
parent 157af93d69
commit 9fd9ce1f9e

View file

@ -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();