Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NavigationView: PaneFooter containing NavigationViewItem crashes app when navigating focus via TAB to Settings item (Regression) #3445

Closed
Felix-Dev opened this issue Oct 19, 2020 · 2 comments · Fixed by #3613
Labels
area-NavigationView NavView control help wanted Issue ideal for external contributors team-Controls Issue for the Controls team

Comments

@Felix-Dev
Copy link
Contributor

Felix-Dev commented Oct 19, 2020

Describe the bug
When putting a NavigationViewItem inside the NavigationView.PaneFooter area as the last item and then moving focus to the NavigationView's in-built Settings item via TAB, the app crashes:

<muxc:NavigationView>
    <muxc:NavigationView.MenuItems>
        <muxc:NavigationViewItem Icon="Home" Content="Home"/>
    </muxc:NavigationView.MenuItems>

    <muxc:NavigationView.PaneFooter>
        <muxc:NavigationViewItem>
            <muxc:NavigationViewItem.Content>
                <StackPanel Orientation="Horizontal">
                    <PersonPicture Width="20" Height="20" />
                    <TextBlock Text="Account" Margin="10,0,0,0" />
                </StackPanel>
            </muxc:NavigationViewItem.Content>
        </muxc:NavigationViewItem>
    </muxc:NavigationView.PaneFooter>
</muxc:NavigationView>

navview-regression-focus-crash

Note that for the crash to happen, an existing NavigationViewItem needs to be selected when moving focus. This is a regression which first occurs in WinUI 2.5.0-prerelease.200812001 and is probably caused by PR #1997.

Expected behavior
App should not crash and focus should move to Settings item.

NuGet package version:

  • Microsoft.UI.Xaml 2.5.0-prerelease.200812001
  • Microsoft.UI.Xaml v2.5.0-prerelease.200923002

Additional context
I would like to take a look at this. I might have to write an interaction test though and I'm currently blocked on PR #3359. If that PR will take a while to be merged, and a fix for this issue needs to get out real fast (depending on WinUI's 2.5 release plan) then someone else without my interaction test issues is probably a better choice to work on this. @StephenLPeters to comment (seems like unrelated test pipeline issue(s) need to be resolved first for that PR to be merged).

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Oct 19, 2020
@ranjeshj ranjeshj added area-NavigationView NavView control team-Controls Issue for the Controls team help wanted Issue ideal for external contributors and removed needs-triage Issue needs to be triaged by the area owners labels Oct 19, 2020
@ranjeshj
Copy link
Contributor

@Felix-Dev Thanks for filing the issue. Please go ahead with your investigation. Thanks!

@ranjeshj
Copy link
Contributor

@YuliKl as FYI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-NavigationView NavView control help wanted Issue ideal for external contributors team-Controls Issue for the Controls team
Projects
None yet
2 participants