mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:27:45 +00:00
LibWeb: Honor pointer-events: none
when hitting a PaintableBox
If the PaintableBox had children, but we didn't hit any of them, we default to saying that you hit the PaintableBox itself. However, if said PaintableBox has `pointer-events: none`, we should say nothing was hit, so that the hit testing can continue. This fixes an issue where Discord server icons were not clickable.
This commit is contained in:
parent
76e520884e
commit
245e3b9c3a
1 changed files with 4 additions and 0 deletions
|
@ -688,6 +688,10 @@ Optional<HitTestResult> PaintableBox::hit_test(CSSPixelPoint position, HitTestTy
|
||||||
continue;
|
continue;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!visible_for_hit_testing())
|
||||||
|
return {};
|
||||||
|
|
||||||
return HitTestResult { const_cast<PaintableBox&>(*this) };
|
return HitTestResult { const_cast<PaintableBox&>(*this) };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue