Skip to content

TabView arrow-key tab navigation does nothing in Release builds #24560

Closed

Description

@MartinZikmund

Current behavior 🐛

With keyboard focus on a TabViewItem, pressing Left/Right is marked as handled, but focus never moves. This only happens in Release builds; Debug builds behave correctly.

TabView.MoveFocus calls control.Focus(FocusState.Keyboard) inside MUX_ASSERT(...). Uno's MUX_ASSERT is [Conditional("DEBUG")], so the compiler drops the whole call, including its argument, from Release builds, and MoveFocus still returns true.

Expected behavior 🎯

Focus follows the WinUI order: Tab 1 → Tab 1 close button → Tab 2 → … → add-tab button. WinUI fixed the same pattern upstream (winui3/release/2.5.1, TabView::MoveFocus) by hoisting the Focus() call out of the assert.

How to reproduce it (as minimally and precisely as possible) 🔬

  1. Build an app in Release with a TabView containing two TabViewItems.
  2. Tab into the first tab so it has keyboard focus.
  3. Press Right. Focus stays on the first tab.

Workaround 🛠️

None.

Renderer 🎨

  • Skia
  • Native

Affected platforms 📱💻🖥️

All platforms 🌍

Uno.Sdk version (and other relevant versions) 📦

master (7.0 dev)

IDE version 🧑‍💻

No response

Anything else we need to know? 💬

Found while auditing Uno's WinUI ports against winui3/release/2.5.1. No other side-effecting MUX_ASSERT/Debug.Assert calls exist in src/.

Activity

  1. added
    kind/bug
    triage/untriaged
    on Sep 19, 2026
  2. Jen-Uno commented on Sep 30, 2026

    @Jen-Uno
    Contributor

    QA: closing out without a manual pass. The fix in #24564 ships with automated tests (Given_TabView.cs) that exercise the change.

    If you still see this behaviour on a build that includes that PR, please reopen or comment here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugtriage/untriaged

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions