1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 17:35:08 +00:00

LibGUI: Fix AbstractView selection after initial focusin event

After moving the cursor to the home position, clear the
selection.

Fixes #3925.
This commit is contained in:
Joseph Bywater 2020-11-03 00:17:02 +00:00 committed by Andreas Kling
parent dec6c0a207
commit 15bc42479a

View file

@ -710,8 +710,10 @@ void AbstractView::focusin_event(FocusEvent& event)
{
ScrollableWidget::focusin_event(event);
if (model() && !cursor_index().is_valid())
if (model() && !cursor_index().is_valid()) {
move_cursor(CursorMovement::Home, SelectionUpdate::None);
clear_selection();
}
}
}