mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
Fixes the selection rect on the title text of https://modern-css.com/ being misaligned with the actual characters.
24 lines
513 B
HTML
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>
|