mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 10:07:15 +02:00
LibWeb: Update placeholder visibility when the placeholder value changes
Otherwise, setting a placeholder on an element that previously did not have a placeholder would have no visible effect.
This commit is contained in:
committed by
Andreas Kling
parent
9f3c3925e0
commit
6af7f7e0f5
Notes:
sideshowbarker
2024-07-17 07:20:49 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/6af7f7e0f5 Pull-request: https://github.com/SerenityOS/serenity/pull/23838
@@ -1085,8 +1085,10 @@ void HTMLInputElement::form_associated_element_attribute_changed(FlyString const
|
||||
update_shadow_tree();
|
||||
}
|
||||
} else if (name == HTML::AttributeNames::placeholder) {
|
||||
if (m_placeholder_text_node)
|
||||
if (m_placeholder_text_node) {
|
||||
m_placeholder_text_node->set_data(placeholder());
|
||||
update_placeholder_visibility();
|
||||
}
|
||||
} else if (name == HTML::AttributeNames::readonly) {
|
||||
handle_readonly_attribute(value);
|
||||
} else if (name == HTML::AttributeNames::src) {
|
||||
|
||||
Reference in New Issue
Block a user