mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
LibWeb: Hide inner text of input element when showing placeholder
This commit is contained in:
committed by
Tim Flynn
parent
b4bae912c9
commit
4205ac778f
@@ -398,8 +398,10 @@ void HTMLTextAreaElement::update_placeholder_visibility()
|
||||
auto placeholder_text = get_attribute(AttributeNames::placeholder);
|
||||
if (placeholder_text.has_value() && m_text_node->data().is_empty()) {
|
||||
MUST(m_placeholder_element->style_for_bindings()->set_property(CSS::PropertyID::Display, "block"sv));
|
||||
MUST(m_inner_text_element->style_for_bindings()->set_property(CSS::PropertyID::Display, "none"sv));
|
||||
} else {
|
||||
MUST(m_placeholder_element->style_for_bindings()->set_property(CSS::PropertyID::Display, "none"sv));
|
||||
MUST(m_inner_text_element->style_for_bindings()->set_property(CSS::PropertyID::Display, "block"sv));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user