1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 14:54:57 +00:00

LibWeb: Reset form association when the element's form attribute changes

This commit is contained in:
Timothy Flynn 2024-02-03 09:33:33 -05:00 committed by Andrew Kaster
parent 23fb1209af
commit 960dcf0e56
12 changed files with 75 additions and 40 deletions

View file

@ -240,9 +240,8 @@ void HTMLTextAreaElement::children_changed()
}
}
void HTMLTextAreaElement::attribute_changed(FlyString const& name, Optional<String> const& value)
void HTMLTextAreaElement::form_associated_element_attribute_changed(FlyString const& name, Optional<String> const& value)
{
HTMLElement::attribute_changed(name, value);
if (name == HTML::AttributeNames::placeholder) {
if (m_placeholder_text_node)
m_placeholder_text_node->set_data(value.value_or(String {}));