1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:58:12 +00:00

LibWeb: Don't collapse TextNode if it's editable

Fixes #16127
This commit is contained in:
Baitinq 2022-11-26 00:14:36 +01:00 committed by Andreas Kling
parent 76de41c3b7
commit 73e87d694e

View file

@ -255,6 +255,9 @@ void InlineLevelIterator::enter_text_node(Layout::TextNode const& text_node)
do_respect_linebreaks = true;
}
if (text_node.dom_node().is_editable() && !text_node.dom_node().is_uninteresting_whitespace_node())
do_collapse = false;
// FIXME: The const_cast here is gross.
const_cast<TextNode&>(text_node).compute_text_for_rendering(do_collapse);