diff --git a/Base/home/anon/www/inline-block-link.html b/Base/home/anon/www/inline-block-link.html
new file mode 100644
index 0000000000..c74a691e04
--- /dev/null
+++ b/Base/home/anon/www/inline-block-link.html
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+ Here is some test text.
+ Here is a test link.
+
+
+
diff --git a/Base/home/anon/www/welcome.html b/Base/home/anon/www/welcome.html
index 927651e724..adb12f2f03 100644
--- a/Base/home/anon/www/welcome.html
+++ b/Base/home/anon/www/welcome.html
@@ -28,6 +28,7 @@ span#ua {
Your user agent is:
Some small test pages:
+ - link inside display: inline-block
- setInterval() test
- html character escape test
- window.location property
diff --git a/Libraries/LibWeb/Layout/LayoutBlock.cpp b/Libraries/LibWeb/Layout/LayoutBlock.cpp
index 63fa16c5f6..4d83f405be 100644
--- a/Libraries/LibWeb/Layout/LayoutBlock.cpp
+++ b/Libraries/LibWeb/Layout/LayoutBlock.cpp
@@ -391,6 +391,8 @@ HitTestResult LayoutBlock::hit_test(const Gfx::Point& position) const
for (auto& line_box : m_line_boxes) {
for (auto& fragment : line_box.fragments()) {
if (enclosing_int_rect(fragment.rect()).contains(position)) {
+ if (fragment.layout_node().is_block())
+ return to(fragment.layout_node()).hit_test(position);
return { fragment.layout_node(), fragment.text_index_at(position.x()) };
}
}