ladybird/Tests/LibWeb/Text/input/hit_testing/css-transforms.html
Jonne Ransijn a0fb092d94 LibWeb: Transform PaintableBox::hit_test positions
Elements with transforms were tested on their pre-transformed
positions, causing incorrect hits.

Copy the position transformation done in `StackingContext::hit_test`
to ensure that hit tests are done on the _actual_ position.
2024-11-23 22:06:32 +01:00

22 lines
681 B
HTML

<!DOCTYPE html>
<div>
<input id="input" type="text">
<div id="div" style="position: absolute; transform: translate(0px, 42px);">
This text should not be hit when clicking the input.
</div>
</div>
<script src="../include.js"></script>
<script>
asyncTest((done) => {
document.getElementById("input").addEventListener("click", () => {
println("clicked the <input>");
});
document.getElementById("div").addEventListener("click", () => {
println("clicked the <div>");
});
window.addEventListener("load", () => {
internals.click(12, 12);
done();
})
});
</script>