You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ComboBox doesn't bring the selected item into view when the dropdown opens #25835
When a ComboBox has a selected item far down its list (for example, item 237 of 240) and its dropdown is opened, the dropdown shows the top of the list. The selected item isn't realized or visible until the user scrolls to it.
Expected behavior 🎯
Match WinUI: opening the dropdown brings the selected item into view (WinUI centers it in ComboBox::ArrangePopup through SetVerticalOffsetOnCarouselPanel, driven by m_bShouldCenterSelectedItem).
How to reproduce it (as minimally and precisely as possible) 🔬
A ComboBox with 240 string items.
Set SelectedIndex = 237 while the dropdown is closed.
Set IsDropDownOpen = true.
Uno: the dropdown shows the first items. WinUI: the selected item is in view.
Workaround 🛠️
None verified.
Affected platforms 📱💻🖥️
All platforms 🌍
Uno.Sdk version (and other relevant versions) 📦
Current master.
IDE version 🧑💻
N/A
Anything else we need to know? 💬
Uno's ComboBox port calls SetFocusedItem(selectedItemIndex, m_bShouldCenterSelectedItem, forceFocus: true, …) on open, but m_bShouldCenterSelectedItem is never set because the ArrangePopup centering isn't ported. Forcing shouldScrollIntoView: true there isn't enough on its own. The runtime test Given_ComboBox.When_ComboBox_Opened_With_Selection_ScrollIntoView reproduces it.
Related cleanup to do with the fix: the two existing Given_ComboBox tests that share the same helper, When_ComboBox_ScrollIntoView_SelectedItem and When_ComboBox_ScrollIntoView_SelectedIndex, are excluded on NativeWinUI (and SkiaWasm, flaky per #9080). The WinUI exclusion cites an internal issue, and as far as I can tell these tests have never been run against WinUI.
When fixing this:
Run the three tests (those two plus When_ComboBox_Opened_With_Selection_ScrollIntoView, once its [Ignore] is removed) with /winui-runtime-tests, and drop the NativeWinUI exclusion if they pass. Given_ComboBox has no class-level exclusion, so they will then run on the WinAppSDK CI job.
Since fix(Selector): Bring a selection into view only with focus #25834, a list only brings a new selection into view while it has focus (as on WinUI). The two existing tests select while the dropdown is open. WinUI's open path forces focus into an item, so they should still hold, but that's the part to confirm on WinUI.
Activity
test(ComboBox): Cover opening with an existing selection
Xiaoy312 commentedon Oct 29, 2026
Related cleanup to do with the fix: the two existing
Given_ComboBoxtests that share the same helper,When_ComboBox_ScrollIntoView_SelectedItemandWhen_ComboBox_ScrollIntoView_SelectedIndex, are excluded onNativeWinUI(andSkiaWasm, flaky per #9080). The WinUI exclusion cites an internal issue, and as far as I can tell these tests have never been run against WinUI.When fixing this:
When_ComboBox_Opened_With_Selection_ScrollIntoView, once its[Ignore]is removed) with/winui-runtime-tests, and drop theNativeWinUIexclusion if they pass.Given_ComboBoxhas no class-level exclusion, so they will then run on the WinAppSDK CI job.