1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:38:10 +00:00

LibWeb: Move cursor along when drag-selecting in editable content

This commit is contained in:
Andreas Kling 2021-02-15 18:12:14 +01:00
parent 7f616449ec
commit c51209a06a

View file

@ -262,6 +262,7 @@ bool EventHandler::handle_mousemove(const Gfx::IntPoint& position, unsigned butt
if (m_in_mouse_selection) {
auto hit = layout_root()->hit_test(position, Layout::HitTestType::TextCursor);
if (hit.layout_node && hit.layout_node->dom_node()) {
m_frame.set_cursor_position(DOM::Position(*node, result.index_in_node));
layout_root()->set_selection_end({ hit.layout_node, hit.index_in_node });
}
if (auto* page = m_frame.page())