mirror of
https://github.com/RGBCube/serenity
synced 2025-07-05 08:57:35 +00:00

Change 'dom_node_for_event_dispatch' to locate the closest layout node with a DOM node instead of only checking the direct ancestor. This fixes hit-testing for buttons because they are wrapped into multiple anonymous layout nodes (internally we use flex formatting for them).
21 lines
467 B
HTML
21 lines
467 B
HTML
<!DOCTYPE html>
|
|
<style>
|
|
#btn {
|
|
background-color: gold;
|
|
font-size: 100px;
|
|
width: 500px;
|
|
border: none;
|
|
}
|
|
</style>
|
|
<script src="../include.js"></script>
|
|
<button type="submit" id="btn">Button</button>
|
|
<script>
|
|
asyncTest(done => {
|
|
const brn = document.getElementById("btn");
|
|
btn.onclick = () => {
|
|
println("Clicked!");
|
|
done();
|
|
};
|
|
internals.click(50, 50);
|
|
});
|
|
</script>
|