microsoft / microsoft/microsoft-ui-xaml
AutoSuggest box: Suggestion list doesn't reset scroll position when opening upwards
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
Description
### Describe the bug
When the suggestion list of an AutoSuggest box opens normally, it resets the scroll view so the first element is in view.
When the suggestion list opens upwards (due to not enough space below the element), it does not reset the scroll view to the first element in view.
This can be replicated in the WinUI 3 gallery.
### Steps to reproduce the bug
1. In the WinUI 3 gallery, go to the AutoSuggestBox
2. Drag the Window to the bottom of the screen so the AutoSuggestBox is just above the bottom of the screen
3. Type a character (for example "a")
4. The Suggestion list opens up
5. Scroll a bit in the Suggestion list
6. Close the suggesiton list (for example by pressing enter)
7. Remove the typed character, the suggestion list opens up again but not scrolled to the start of the list.
8. Type another character, the suggestion list is still not scrolled to the start of the list
### Expected behavior
The suggestion list is scrolled to the start of the list so the first item in the list is visible.
### Screenshots

### NuGet package version
WinUI 3 - Windows App SDK 1.6.3: 1.6.241114003
### Windows version
Windows 11 (23H2): Build 22631
### Additional context
_No response_
Contributor guide
Research direction
Start by reproducing the behavior in the WinUI 3 gallery's AutoSuggestBox, following the listed steps with the suggestion list opening upwards. Compare reopening after scrolling and closing with the expected state: the first suggestion should be visible and the scroll position should reset.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100