mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:47:37 +00:00
LibWeb: Make HTMLInputElement move cursor into text node when focused
This mechanism feels rather awkward, but it's better than nothing.
This commit is contained in:
parent
65bd4477db
commit
9391311760
4 changed files with 29 additions and 0 deletions
|
@ -894,8 +894,14 @@ void Document::set_focused_element(Element* element)
|
|||
if (m_focused_element == element)
|
||||
return;
|
||||
|
||||
if (m_focused_element)
|
||||
m_focused_element->did_lose_focus();
|
||||
|
||||
m_focused_element = element;
|
||||
|
||||
if (m_focused_element)
|
||||
m_focused_element->did_receive_focus();
|
||||
|
||||
if (m_layout_root)
|
||||
m_layout_root->set_needs_display();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue