diff --git a/Userland/Libraries/LibWeb/Page/EventHandler.cpp b/Userland/Libraries/LibWeb/Page/EventHandler.cpp index 8c90e3a50a..e14de1c777 100644 --- a/Userland/Libraries/LibWeb/Page/EventHandler.cpp +++ b/Userland/Libraries/LibWeb/Page/EventHandler.cpp @@ -510,6 +510,11 @@ bool EventHandler::handle_keydown(KeyCode key, unsigned modifiers, u32 code_poin } return true; } + if (key == KeyCode::Key_Home) { + auto& node = *static_cast(const_cast(m_browsing_context.cursor_position().node())); + m_browsing_context.set_cursor_position(DOM::Position { node, 0 }); + return true; + } if (!should_ignore_keydown_event(code_point)) { m_edit_event_handler->handle_insert(m_browsing_context.cursor_position(), code_point); m_browsing_context.increment_cursor_position_offset();