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

'Tab' button does not work when shift button from last button #7064

Closed
Tracked by #14021
AllenMiaoFil opened this issue May 12, 2022 · 13 comments
Closed
Tracked by #14021

'Tab' button does not work when shift button from last button #7064

AllenMiaoFil opened this issue May 12, 2022 · 13 comments
Assignees
Labels
legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint partner/cat 😻 this is an issue that impacts one of our partners or a customer our advisory team is engaged with platform/windows 🪟 s/try-latest-version Please try to reproduce the potential issue on the latest public version t/a11y Relates to accessibility t/bug Something isn't working t/desktop The issue relates to desktop scenarios (MacOS/MacCatalyst/Windows/WinUI/WinAppSDK)

Comments

@AllenMiaoFil
Copy link

Description

The 'Tab' functionality does not work any more when you shift button with 'Tab' from the last button to first button.

And There is no focus functionality in MacOS, has created bug here

Steps to Reproduce

  1. Create two MAUI buttons on main page.
  2. Run application.
  3. Use 'Tab' to shift button.
  4. When he last button get focus, continue use 'Tab' to shift button. you will see the focus never back to first button.

Version with bug

Release Candidate 2

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

Window 10

Did you find any workaround?

No response

Relevant log output

No response

@AllenMiaoFil AllenMiaoFil added s/needs-verification Indicates that this issue needs initial verification before further triage will happen t/bug Something isn't working labels May 12, 2022
@jfversluis jfversluis added platform/windows 🪟 legacy-area-desktop Windows / WinUI / Project Reunion & Mac Catalyst / macOS specifics (Menus & other Controls)) legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor and removed s/needs-verification Indicates that this issue needs initial verification before further triage will happen labels May 12, 2022
@jsuarezruiz jsuarezruiz added the partner/cat 😻 this is an issue that impacts one of our partners or a customer our advisory team is engaged with label May 13, 2022
@kristinx0211 kristinx0211 added the s/verified Verified / Reproducible Issue ready for Engineering Triage label May 16, 2022
@kristinx0211
Copy link

repro on windows with vs 17.3.0 Preview 2.0 [32515.5.main]. repro project:
MauiApp7.zip

@samhouts samhouts added the p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint label Jul 20, 2022
@hartez hartez added the legacy-area-a11y Relates to accessibility label Aug 4, 2022
@Redth Redth added this to the .NET 7 Planning milestone Aug 30, 2022
@rachelkang
Copy link
Member

Hi, @AllenMiaoFil - thanks for bringing this to our attention. This behavior you describe seeing on Windows is the same as the WinUI platform behavior, and therefore is actually the current expected behavior. While Tab will bring you to the next element (from the first button to the second button), Shift + Tab will bring you back to the previous element (From the second button to the first button).

That being said, if you have any specific scenarios to share or any further thoughts/ideas for how keyboard navigation should work, please do share, as we will be further developing on it in the future.

@rachelkang rachelkang added the s/needs-info Issue needs more info from the author label Aug 31, 2022
@ghost
Copy link

ghost commented Aug 31, 2022

Hi @AllenMiaoFil. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@AllenMiaoFil
Copy link
Author

Hey @rachelkang For now I have no requirement for this one, just when I open application, I found 'Tab' doesn't work any more on last button, and can't use Shift + Tab when stay on first button. it's different with other applications.

@ghost ghost added s/needs-attention Issue has more information and needs another look and removed s/needs-info Issue needs more info from the author labels Sep 1, 2022
@rachelkang
Copy link
Member

@AllenMiaoFil You mention that it doesn't work "any more" - when is the last time you saw it working on .NET MAUI? And if you don't mind sharing, what other applications is this working as you expect it to? This information will help us investigate further :)

@rachelkang
Copy link
Member

@AllenMiaoFil I've just learned that Windows has a property to change the keyboard navigation mode to reflect just what you're looking for! The property is called TabFocusNavigation and can be leveraged with handlers.

You can learn more about .NET MAUI handlers here: https://docs.microsoft.com/dotnet/maui/user-interface/handlers/customize

For this scenario, putting this bit of code in your code-behind and then calling on it from the constructor will do the trick :)

void ModifyTabNavigation()
{
        Microsoft.Maui.Handlers.LayoutHandler.Mapper.AppendToMapping("MyCustomization", (handler, view) =>
        {
#if WINDOWS
            handler.PlatformView.TabFocusNavigation = Microsoft.UI.Xaml.Input.KeyboardNavigationMode.Cycle;
#endif
        });
}

Let me know if you have any further questions :)

@rachelkang rachelkang added s/needs-info Issue needs more info from the author and removed s/needs-attention Issue has more information and needs another look labels Sep 6, 2022
@ghost
Copy link

ghost commented Sep 6, 2022

Hi @AllenMiaoFil. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@AllenMiaoFil
Copy link
Author

Hey @rachelkang, I think you mentioned is an other question, for right now, can you repro what I mentioned with the 'Steps to Reproduce'? maybe we are not in same page.

@ghost ghost added s/needs-attention Issue has more information and needs another look and removed s/needs-info Issue needs more info from the author labels Sep 7, 2022
@rachelkang
Copy link
Member

Hi, @AllenMiaoFil - yes, I'm able to repro what you mentioned in the "Steps to Reproduce" you provided, and the code I shared helps to remedy that so you can "Tab" from the last button back to the first as you wish.

Here's an updated sample incorporating the code mentioned:
MauiApp7.zip

@PureWeen PureWeen modified the milestones: .NET 7 Planning, Backlog Sep 7, 2022
@ghost
Copy link

ghost commented Sep 7, 2022

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@PureWeen PureWeen added s/needs-info Issue needs more info from the author and removed s/needs-attention Issue has more information and needs another look labels Sep 7, 2022
@ghost
Copy link

ghost commented Sep 7, 2022

Hi @AllenMiaoFil. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@ghost ghost added the s/no-recent-activity Issue has had no recent activity label Sep 12, 2022
@ghost
Copy link

ghost commented Sep 12, 2022

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

@ghost ghost closed this as completed Sep 15, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Oct 15, 2022
@samhouts samhouts removed s/needs-info Issue needs more info from the author s/no-recent-activity Issue has had no recent activity labels Jan 24, 2023
@samhouts samhouts reopened this Jan 24, 2023
@samhouts samhouts modified the milestones: Backlog, .NET 8 Planning Jan 26, 2023
@samhouts samhouts removed the s/verified Verified / Reproducible Issue ready for Engineering Triage label Apr 5, 2023
@samhouts samhouts modified the milestones: .NET 8 Planning, .NET 8 Apr 6, 2023
@jsuarezruiz
Copy link
Contributor

Testing with the current version seems that the behavior on Windows is correct:
issue-7064

@samhouts samhouts added the s/try-latest-version Please try to reproduce the potential issue on the latest public version label Apr 28, 2023
@ghost ghost closed this as completed May 6, 2023
@Eilon Eilon added t/a11y Relates to accessibility t/desktop The issue relates to desktop scenarios (MacOS/MacCatalyst/Windows/WinUI/WinAppSDK) and removed legacy-area-a11y Relates to accessibility legacy-area-desktop Windows / WinUI / Project Reunion & Mac Catalyst / macOS specifics (Menus & other Controls)) labels May 10, 2024
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint partner/cat 😻 this is an issue that impacts one of our partners or a customer our advisory team is engaged with platform/windows 🪟 s/try-latest-version Please try to reproduce the potential issue on the latest public version t/a11y Relates to accessibility t/bug Something isn't working t/desktop The issue relates to desktop scenarios (MacOS/MacCatalyst/Windows/WinUI/WinAppSDK)
Projects
None yet
Development

No branches or pull requests

10 participants