Files
ladybird/Tests/LibWeb/Text/input/display_list/input-focus-switch-selection-and-caret.html
Jelle Raaijmakers 2e42421553 LibWeb: Invalidate paint cache for input/textarea on focus change
The invalidate_style() calls on text nodes in did_receive_focus() and
did_lose_focus() were no-ops since Node::invalidate_style() returns
early for character data nodes. Replace them with set_needs_repaint()
which properly invalidates the containing PaintableWithLines' paint
cache, ensuring selection highlights are cleared and the caret is
repainted when switching focus between text controls.

Fixes #8363
2026-03-11 16:44:19 +00:00

18 lines
377 B
HTML

<!DOCTYPE html>
<script src="../include.js"></script>
<input id="foo" value="foo">
<input id="bar" value="bar">
<script>
asyncTest(done => {
foo.select();
foo.focus();
requestAnimationFrame(() => {
requestAnimationFrame(() => {
bar.focus();
println(internals.dumpDisplayList());
done();
});
});
});
</script>