LibWeb: Fix textarea placeholder visibility on attribute change

HTMLInputElement calls update_placeholder_visibility() when its
placeholder attribute changes, but HTMLTextAreaElement did not. This
meant dynamically changing the attribute would not toggle the display
of the placeholder and inner text shadow DOM elements.
This commit is contained in:
Praise-Garfield 2026-02-11 12:50:21 +00:00 committed by Jelle Raaijmakers
parent ebd312689e
commit 1b01fae0af
Notes: github-actions[bot] 2026-02-11 15:12:19 +00:00

View file

@ -412,6 +412,7 @@ void HTMLTextAreaElement::form_associated_element_attribute_changed(FlyString co
if (name == HTML::AttributeNames::placeholder) {
if (m_placeholder_text_node)
m_placeholder_text_node->set_data(Utf16String::from_utf8(value.value_or(String {})));
update_placeholder_visibility();
} else if (name == HTML::AttributeNames::maxlength) {
handle_maxlength_attribute();
}