mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 10:01:13 +09:00
LibGUI: Fix laggy mouse selection in TextEditor widget
We were letting the automatic scrolling timer drive all selection updates to fix an unwanted acceleration that was happening. However, if a mousemove occurs *within* the editor widget, we should just handle it right then and there.
This commit is contained in:
parent
344e66caaa
commit
c350bb9178
Notes:
sideshowbarker
2024-07-19 07:20:00 +09:00
Author: https://github.com/awesomekling
Commit: c350bb9178
1 changed files with 1 additions and 1 deletions
|
@ -301,7 +301,7 @@ void TextEditor::mouseup_event(MouseEvent& event)
|
|||
void TextEditor::mousemove_event(MouseEvent& event)
|
||||
{
|
||||
m_last_mousemove_position = event.position();
|
||||
if (m_in_drag_select && !m_automatic_selection_scroll_timer->is_active()) {
|
||||
if (m_in_drag_select && (rect().contains(event.position()) || !m_automatic_selection_scroll_timer->is_active())) {
|
||||
set_cursor(text_position_at(event.position()));
|
||||
m_selection.set_end(m_cursor);
|
||||
did_update_selection();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue