mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00: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:
parent
9f3c3925e0
commit
6af7f7e0f5
Notes:
sideshowbarker
2024-07-17 07:20:49 +09:00
Author: https://github.com/trflynn89
Commit: 6af7f7e0f5
Pull-request: https://github.com/SerenityOS/serenity/pull/23838
3 changed files with 31 additions and 5 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue