mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +00:00
LibWeb: Move event handling & cursor from BrowsingContext to Navigable
This was a long standing FIXME since the introduction of navigables.
This commit is contained in:
@@ -589,10 +589,10 @@ void HTMLElement::did_receive_focus()
|
||||
{
|
||||
if (m_content_editable_state != ContentEditableState::True)
|
||||
return;
|
||||
auto* browsing_context = document().browsing_context();
|
||||
if (!browsing_context)
|
||||
auto navigable = document().navigable();
|
||||
if (!navigable)
|
||||
return;
|
||||
browsing_context->set_cursor_position(DOM::Position::create(realm(), *this, 0));
|
||||
navigable->set_cursor_position(DOM::Position::create(realm(), *this, 0));
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/interaction.html#dom-accesskeylabel
|
||||
|
||||
Reference in New Issue
Block a user