- From: Emilio Cobos Álvarez via GitHub <sysbot+gh@w3.org>
- Date: Sun, 02 Oct 2022 02:39:02 +0000
- To: public-css-archive@w3.org
emilio has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-tables] Hit testing of table rows. == Consider this test-case ([live](https://crisal.io/tmp/tr-hit-test.html)): ```html <!doctype html> <style> table { border-spacing: 100px; border: 1px solid #ccc; } tr { border: 1px solid #ddd; background-color: blue; } td { border: 1px solid #eee; background-color: red; } </style> <table> <tr> <td>A</td> <td>B</td> <td>C</td> </tr> </table> <script> document.addEventListener("click", function(e) { console.log(e.target); }); </script> ``` When you click in between the cells, right now all browsers log the `<table>`. `<tr>`s also draw no backgrounds (though that's interoperable and more risky to change, and might make sense given how cell backgrounds are painted). But not hit-testing the `<tr>` when it does have a layout box and geometry (you can see that using `getBoundingClientRect()` etc) seems fairly weird tho. Given it's interoperable, it might be worth at least specifying this (though maybe there's some appetite to change this?) cc @bfgeek @FremyCompany @smfr Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7817 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Sunday, 2 October 2022 02:39:03 UTC