mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb+UI: Support triple clicking and dragging paragraphs
When triple clicking on text, we should select the entire paragraph, or entire line in <input>s and <textarea>s. If the mouse button is held down and the user starts dragging, the selection expands with additional paragraphs or lines. This expands on the work of Kai Wildberger (PR #7681) but was adjusted for the work that happened previously to support double click + drag moves and includes triple click support for our Qt UI. Co-authored-by: Kai Wildberger <kiawildberger@gmail.com>
This commit is contained in:
committed by
Sam Atkins
parent
14b35887de
commit
2a2f8ef90b
Notes:
github-actions[bot]
2026-02-06 14:19:18 +00:00
Author: https://github.com/gmta Commit: https://github.com/LadybirdBrowser/ladybird/commit/2a2f8ef90b8 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7771 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -304,6 +304,8 @@ void EventLoop::process_input_events() const
|
||||
return page.handle_mousewheel(mouse_event.position, mouse_event.screen_position, mouse_event.button, mouse_event.buttons, mouse_event.modifiers, mouse_event.wheel_delta_x, mouse_event.wheel_delta_y);
|
||||
case MouseEvent::Type::DoubleClick:
|
||||
return page.handle_doubleclick(mouse_event.position, mouse_event.screen_position, mouse_event.button, mouse_event.buttons, mouse_event.modifiers);
|
||||
case MouseEvent::Type::TripleClick:
|
||||
return page.handle_tripleclick(mouse_event.position, mouse_event.screen_position, mouse_event.button, mouse_event.buttons, mouse_event.modifiers);
|
||||
}
|
||||
VERIFY_NOT_REACHED();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user