dialog: don't scroll beyond text bounds

Issue #5174
This commit is contained in:
Norman Feske 2024-04-18 11:25:33 +02:00 committed by Christian Helmuth
parent f8c420a78b
commit c6aa50ec56

View File

@ -631,6 +631,8 @@ void Text_area_widget::handle_event(Event const &event, Action &action)
if (event.event.press() && !event.event.key_press(Input::BTN_LEFT))
_sanitize_scroll_position();
else
_clamp_scroll_position_to_upper_bound();
if (update_dialog)
action.refresh_text_area();