LibWeb: Update the <textarea> shadow DOM after reseting its form owner

This generally happens after a form is submitted. We need to update the
text node in the shadow DOM to actually display the reset value.
This commit is contained in:
Timothy Flynn 2024-03-14 10:33:15 -04:00 committed by Andreas Kling
parent c0d594568d
commit 9eb38ce79c
Notes: sideshowbarker 2024-07-17 00:23:42 +09:00
3 changed files with 40 additions and 1 deletions

View file

@ -96,7 +96,10 @@ void HTMLTextAreaElement::reset_algorithm()
// and set the raw value of element to its child text content.
set_raw_value(child_text_content());
update_placeholder_visibility();
if (m_text_node) {
m_text_node->set_text_content(m_raw_value);
update_placeholder_visibility();
}
}
void HTMLTextAreaElement::form_associated_element_was_inserted()