dialog: allow out-of-view cursor when scrolling

This patch relaxes the counter-intuitive enforcement of keeping the
text cursor always in view when using the scroll wheel.

Issue #5174
This commit is contained in:
Norman Feske 2024-04-08 16:13:48 +02:00 committed by Christian Helmuth
parent e04336d087
commit 8875e3b879

View File

@ -629,7 +629,8 @@ void Text_area_widget::handle_event(Event const &event, Action &action)
if (all_lines_visible)
_scroll.y.value = 0;
_sanitize_scroll_position();
if (event.event.press() && !event.event.key_press(Input::BTN_LEFT))
_sanitize_scroll_position();
if (update_dialog)
action.refresh_text_area();