diff --git a/Libraries/LibWeb/Layout/LayoutBlock.cpp b/Libraries/LibWeb/Layout/LayoutBlock.cpp index 38d1e818ad..013f9f3d1b 100644 --- a/Libraries/LibWeb/Layout/LayoutBlock.cpp +++ b/Libraries/LibWeb/Layout/LayoutBlock.cpp @@ -359,7 +359,10 @@ HitTestResult LayoutBlock::hit_test(const Gfx::Point& position) const } } } - return {}; + + // FIXME: This should be smarter about the text position if we're hitting a block + // that has text inside it, but `position` is to the right of the text box. + return { rect().contains(position.x(), position.y()) ? this : nullptr }; } NonnullRefPtr LayoutBlock::style_for_anonymous_block() const