mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 19:59:17 +00:00
LibWeb: Also invalidate placeholder style on focus change
This commit is contained in:
committed by
Andreas Kling
parent
a661daea71
commit
cca03e484b
@@ -1137,6 +1137,9 @@ void HTMLInputElement::did_receive_focus()
|
||||
return;
|
||||
m_text_node->invalidate_style();
|
||||
|
||||
if (m_placeholder_text_node)
|
||||
m_placeholder_text_node->invalidate_style();
|
||||
|
||||
document().set_cursor_position(DOM::Position::create(realm(), *m_text_node, 0));
|
||||
}
|
||||
|
||||
@@ -1145,6 +1148,9 @@ void HTMLInputElement::did_lose_focus()
|
||||
if (m_text_node)
|
||||
m_text_node->invalidate_style();
|
||||
|
||||
if (m_placeholder_text_node)
|
||||
m_placeholder_text_node->invalidate_style();
|
||||
|
||||
commit_pending_changes();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user