Files
ladybird/Tests/LibWeb/Text/input/textarea-arrow-navigation-with-letter-spacing.html
Jelle Raaijmakers 8654e2caf4 LibWeb: Apply letter-spacing for selection rects and grapheme bounds
Fixes the selection rect on the title text of https://modern-css.com/
being misaligned with the actual characters.
2026-02-17 10:51:48 +01:00

24 lines
513 B
HTML

<!DOCTYPE html>
<script src="include.js"></script>
<style>
textarea {
font-size: 16px;
letter-spacing: 5px;
}
</style>
<textarea id="text">iiiii
WWWWW</textarea>
<script>
test(() => {
document.body.offsetWidth;
text.setSelectionRange(3, 3);
internals.sendKey(text, "Down");
println(`Down from offset 3: position=${text.selectionStart}`);
text.setSelectionRange(9, 9);
internals.sendKey(text, "Up");
println(`Up from offset 9: position=${text.selectionStart}`);
});
</script>