mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 12:07:14 +02:00
LibWeb: Draw caret for empty <input>s and <textarea>s
Our change to generate spans in PaintableWithLines from fragments also broke drawing the caret for empty <input>s and <textarea>s, since spans was empty in that case. Fix this by moving caret drawing to PaintableWithLines, and only invoking it if we have a cursor position set.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
a69df4d25b
commit
3bc4374344
Notes:
github-actions[bot]
2026-02-11 10:29:24 +00:00
Author: https://github.com/gmta Commit: https://github.com/LadybirdBrowser/ladybird/commit/3bc43743440 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7859
9
Tests/LibWeb/Text/input/display_list/input-caret.html
Normal file
9
Tests/LibWeb/Text/input/display_list/input-caret.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<script src="../include.js"></script>
|
||||
<input value="hello" style="width: 100px" />
|
||||
<script>
|
||||
test(() => {
|
||||
document.querySelector("input").focus();
|
||||
println(internals.dumpDisplayList());
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user