mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-07 01:21:57 +00:00
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.
22 lines
681 B
HTML
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>
|