From edd4ff9cfcb2ae6a00c739a57f69a2c217948ebb Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 25 May 2021 16:43:35 +0100 Subject: [PATCH] ListBox: Select row on focus --- modules/juce_gui_basics/widgets/juce_ListBox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/juce_gui_basics/widgets/juce_ListBox.cpp b/modules/juce_gui_basics/widgets/juce_ListBox.cpp index 17d565b9c6..6da89672e4 100644 --- a/modules/juce_gui_basics/widgets/juce_ListBox.cpp +++ b/modules/juce_gui_basics/widgets/juce_ListBox.cpp @@ -32,12 +32,12 @@ static AccessibilityActions getListRowAccessibilityActions (RowComponentType& ro auto onFocus = [&rowComponent] { rowComponent.owner.scrollToEnsureRowIsOnscreen (rowComponent.row); + rowComponent.owner.selectRow (rowComponent.row); }; auto onPress = [&rowComponent, onFocus] { onFocus(); - rowComponent.owner.selectRow (rowComponent.row); rowComponent.owner.keyPressed (KeyPress (KeyPress::returnKey)); };