question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NavigationView Keyboard Focus is Broken in Top Navigation Mode

See original GitHub issue

Describe the bug I’m noticing issues with Keyboard focus navigation of the arrow keys on NavigationView when in Top PaneDisplayMode. However, the weird thing is, I can see similar (though slightly different) issues between 2.3.2002 and 2.4.2 even though they’re different implementations with the ItemsRepeater!

I have a branch here which demonstrates the issue.

Not sure if related to #2175 or not (probably not as was an issue in 2.3.2002 as well)?

Steps to reproduce the bug

  1. Clone and move to branch here
  2. Run app (make sure NOT maximized, should be default)
  3. Hit Tab to focus on ‘Controls’
  4. Use right-arrow keys a few times to navigate to Settings

Note: Other2 and Other3 are skipped! And when you use left from Settings as well!

If you Maximize the app, this problem goes away… 🤷‍♂️ Seems like maybe some overflow logic is interfering with Keyboard focus???

If you shrink the window smaller a different behavior is exhibited with some middle items being skipped. Something related to the Horizontal width of the control is effecting Keyboard navigation here.

Expected behavior Keyboard focus should navigate to each item in the top navigation header, just as things work vertically in the normal mode.

Screenshots See live stream clip here

Version Info NuGet package version: 2.3.2.200213001 & 2.4.2

Windows 10 version Saw the problem?
Insider Build (xxxxx)
May 2020 Update (19041) Yes
November 2019 Update (18363)
May 2019 Update (18362)
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Mobile
Xbox
Surface Hub
IoT

Additional context

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
chingucodingcommented, Jun 16, 2020

Update: It turns out, the reason I was not able to repro this is that I disabled the XAML Debug Tools, which when enabled, occludes some NavView items when the window is narrow enough:

gif

The arrow navigation always skips the items that are occluded by the XAML Debug Tools. @ojhad FYI

1reaction
kmgallahancommented, Jul 8, 2020

I just wanted to comment that I had a laugh when I saw the presence of the debug tool’s UI is causing a “bug”… it’s just one of those things you’d never expect.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Focusing text input in navigation view bounces back to ...
The issue is that when navigating to RegistrationView and focusing the input field when using the soft keyboard on simulator (or device) the ......
Read more >
SwiftUI NavigationLink pops out by itself
iOS 14.5 messed up the whole app navigation und now views are immediately popped upon being pushed so the App jumps around and...
Read more >
iOS 14 (SwiftUI) Sheet Modals not
I moved my call .sheet() call away from the button and to my top level View inside NavigationView and the problem has gone....
Read more >
Support keyboard navigation | Android Developers
A keyboard offers not only a convenient mode for text input, but also offers a way for users to navigate and interact with...
Read more >
NavigationView.SelectionFollowsFocus Property
A value of the enumeration that indicates whether selection changes when keyboard focus changes. The default is Disabled. Attributes. Microsoft.UI.Xaml.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found