LibWeb: Use correct realm when focusing HTMLTextAreaElement

This matches HTMLInputElement, and fixes the crash when focusing a
textarea.
This commit is contained in:
Sam Atkins 2023-09-29 11:59:13 +01:00 committed by Tim Flynn
parent b32b277192
commit dcf3bdcb9a
Notes: sideshowbarker 2024-07-17 09:39:38 +09:00

View file

@ -56,7 +56,7 @@ void HTMLTextAreaElement::did_receive_focus()
return; return;
if (!m_text_node) if (!m_text_node)
return; return;
browsing_context->set_cursor_position(DOM::Position::create(*vm().current_realm(), *m_text_node, 0)); browsing_context->set_cursor_position(DOM::Position::create(realm(), *m_text_node, 0));
} }
void HTMLTextAreaElement::did_lose_focus() void HTMLTextAreaElement::did_lose_focus()