Xamarin Forms Navigation and physical keyboard

Miroslav Hrázský 1 Reputation point
2021-05-17T16:36:45.15+00:00

Simple app, two pages, both have NavigationPage.HasNavigationBar="false".
From the first one, I move to the second one by calling Navigation.PushAsync.
The second page has only one Entry and one Button. Entry has focus when the page is displayed.
And now it begins: when I press the physical Tab key focus moves to Button (now I can press Enter key to push the button). When I press the Tab key again focus moves to something non-visual and it seems to be an invisible navigation bar because when I press the physical Enter key now I'll return to the first page.

I was trying to solve another problem with PushModalAsync and the physical keyboard. When you are pressing the Tab key on the modal page you are moving focus not only between visible and invisible controls on this page BUT also on the first page :-).

So non-modal navigation is better for me, but this hidden navigation bar behaviour is a problem too.

This behaviour can be recreated also while debugging in Android emulator.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,253 questions
{count} votes

1 answer

Sort by: Most helpful
  1. JarvanZhang 23,931 Reputation points
    2021-05-19T06:30:23.84+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    Hi, MiroslavHrzsk. I following the steps to test the function and reproduce the issue. It may a potential issue with VS debug tool, you could send a feedback to the
    developer community site. Please see How to report a problem with Visual Studio - Visual Studio | Microsoft Learn

    It's not recommend to use tab to switch the focus on views because the physical device doesn't have the key.

    Best Regards,

    Jarvan Zhang


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.