mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
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
18 lines
377 B
HTML
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>
|