mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:48:11 +00:00
LibWeb: Add HTMLElement::did_receive_focus()
This commit is contained in:
parent
6b17ab77f3
commit
5d76fa72e9
2 changed files with 11 additions and 0 deletions
|
@ -547,4 +547,14 @@ TokenizedFeature::NoOpener HTMLElement::get_an_elements_noopener(StringView targ
|
|||
return TokenizedFeature::NoOpener::No;
|
||||
}
|
||||
|
||||
void HTMLElement::did_receive_focus()
|
||||
{
|
||||
if (m_content_editable_state != ContentEditableState::True)
|
||||
return;
|
||||
auto* browsing_context = document().browsing_context();
|
||||
if (!browsing_context)
|
||||
return;
|
||||
browsing_context->set_cursor_position(DOM::Position::create(realm(), *this, 0));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue