[Webkit-unassigned] [Bug 182181] Range getBoundingClientRect returning zero rect on simple text node with <br> before it
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Feb 1 22:53:22 PST 2018
https://bugs.webkit.org/show_bug.cgi?id=182181
--- Comment #1 from Benjamin San Souci <benjamin.sansouci at gmail.com> ---
I've been able to repro this with 2 text nodes next to each other under a div:
```
<html>
<head>
</head>
<body>
<script>
let d = document.createElement('div');
d.appendChild(document.createTextNode("Testing something"));
d.appendChild(document.createTextNode("And another thing here"));
document.body.appendChild(d);
let r = new Range();
let node = document.getElementsByTagName('div')[0].childNodes[1];
r.setStart(node, 0);
r.setEnd(node, 15);
let rect = r.getBoundingClientRect();
alert(JSON.stringify(rect));
</script>
</body>
</html>
```
This will popup a 0,0,0,0 rect.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180202/168af2ed/attachment-0001.html>
More information about the webkit-unassigned
mailing list