From 869bef523eb6947bf2d5159d70f2ec6c68fc5c69 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Tue, 8 Aug 2023 15:35:15 +0200 Subject: [PATCH] LibWeb: Return true for "overflow: auto" from Box::is_scrollable() is_scrollable() is currently used to determine if box support scroll user interaction so it should return true for "auto" overflow. --- Userland/Libraries/LibWeb/Layout/Box.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Layout/Box.cpp b/Userland/Libraries/LibWeb/Layout/Box.cpp index 837eaa758a..72ce221782 100644 --- a/Userland/Libraries/LibWeb/Layout/Box.cpp +++ b/Userland/Libraries/LibWeb/Layout/Box.cpp @@ -58,7 +58,7 @@ bool Box::is_scroll_container() const bool Box::is_scrollable() const { // FIXME: Support horizontal scroll as well (overflow-x) - return computed_values().overflow_y() == CSS::Overflow::Scroll; + return computed_values().overflow_y() == CSS::Overflow::Scroll || computed_values().overflow_y() == CSS::Overflow::Auto; } void Box::set_needs_display()