mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-16 05:51:55 +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:
parent
dec6c0a207
commit
15bc42479a
Notes:
sideshowbarker
2024-07-19 17:32:34 +09:00
Author: https://github.com/AmusedNetwork 🔰
Commit: 15bc42479a
Pull-request: https://github.com/SerenityOS/serenity/pull/3927
Reviewed-by: https://github.com/awesomekling
1 changed files with 3 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue