LibWeb: Draw caret for empty contenteditable elements

We don't have a text node in these, so no fragments either. Maintaining
a special case for this situation seems much simpler than reworking
`contenteditable`s to always have a fragment.
This commit is contained in:
Jelle Raaijmakers
2026-02-10 12:08:23 +01:00
committed by Jelle Raaijmakers
parent 3bc4374344
commit d3a2e4bbbb
Notes: github-actions[bot] 2026-02-11 10:29:15 +00:00
3 changed files with 38 additions and 8 deletions

View File

@@ -0,0 +1,9 @@
<!DOCTYPE html>
<script src="../include.js"></script>
<div contenteditable style="width: 100px; height: 20px"></div>
<script>
test(() => {
document.querySelector("div").focus();
println(internals.dumpDisplayList());
});
</script>