Skip to content

Commit c5d9662

Browse files
authored
Merge pull request #64 from johnathan-coe/develop
Fix: ListBox not scrolling to selected item with PreviewSelection disabled
2 parents 96577ba + fe32557 commit c5d9662

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

AutoCompleteTextBox/AutoCompleteTextBox/Editors/AutoCompleteTextBox.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,14 +489,15 @@ private void OnSelectionAdapterCommit(SelectionAdapter.EventCause cause)
489489

490490
private void OnSelectionAdapterSelectionChanged()
491491
{
492+
ScrollToSelectedItem();
493+
492494
if (!PreviewSelection)
493495
return;
494496

495497
_isUpdatingText = true;
496498
Editor.Text = ItemsSelector.SelectedItem == null ? Filter : GetDisplayText(ItemsSelector.SelectedItem);
497499
Editor.SelectionStart = Editor.Text.Length;
498500
Editor.SelectionLength = 0;
499-
ScrollToSelectedItem();
500501
_isUpdatingText = false;
501502
}
502503

0 commit comments

Comments
 (0)