1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:38:11 +00:00

LibWeb: Use correct offset value when replacing character data

Previously, the range's end offset was being set using it's previous
value.
This commit is contained in:
Tim Ledbetter 2024-02-06 19:26:03 +00:00 committed by Andreas Kling
parent 40246adfb9
commit 0577a664dd
3 changed files with 17 additions and 1 deletions

View file

@ -0,0 +1,15 @@
<script src="../include.js"></script>
<script>
test(() => {
const text = new Text("foobar");
const range = document.createRange();
range.setEnd(text, 5);
text.deleteData(5, 1);
text.deleteData(4, 1);
text.deleteData(3, 1);
println(text.data);
})
</script>