diff --git a/Userland/Libraries/LibWeb/Page/EventHandler.cpp b/Userland/Libraries/LibWeb/Page/EventHandler.cpp index e14de1c777..5c19a40a40 100644 --- a/Userland/Libraries/LibWeb/Page/EventHandler.cpp +++ b/Userland/Libraries/LibWeb/Page/EventHandler.cpp @@ -515,6 +515,11 @@ bool EventHandler::handle_keydown(KeyCode key, unsigned modifiers, u32 code_poin m_browsing_context.set_cursor_position(DOM::Position { node, 0 }); return true; } + if (key == KeyCode::Key_End) { + auto& node = *static_cast(const_cast(m_browsing_context.cursor_position().node())); + m_browsing_context.set_cursor_position(DOM::Position { node, (unsigned)node.data().length() }); + 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();