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 doesn't work correctly with CollectionView on Windows platform #16437

Open
systemloc opened this issue Jul 30, 2023 · 2 comments
Open

Tab doesn't work correctly with CollectionView on Windows platform #16437

systemloc opened this issue Jul 30, 2023 · 2 comments
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView area-keyboard Keyboard, soft keyboard platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@systemloc
Copy link

Description

Tab will typically cycle through various text entry controls, but this appears to be broken when placing multiple controls in a CollectionView. Referring to the sample XAML below, if a 3 element array is created and a CollectionView containing an Entry control is created, then 3 entry controls will be displayed, but you can't use the tab key to iterate the focus through them. In contrast, if you place several Entry controls in a VerticalStackLayout or Grid, then tab can be used to iterate through the focus as expected.

Reproduction code creates a two column grid, one with a CollectionView containing 3 Entry controls, and one column containing a similar VerticalStackView containing 3 Entry controls. Tab will iterate through the VerticalStackView as expected, but doesn't for the CollectionView.

Steps to Reproduce

Sample XAML code to demonstrate the bug:

<CollectionView Grid.Column="1"> <CollectionView.ItemsSource> <x:Array Type="{x:Type Color}"> <Color>Red</Color> <Color>Green</Color> <Color>Blue</Color> </x:Array> </CollectionView.ItemsSource> <CollectionView.ItemTemplate> <DataTemplate> <Entry FontSize="12" HeightRequest="50"/> </DataTemplate> </CollectionView.ItemTemplate> </CollectionView>

Link to public reproduction project repository

https://github.com/systemloc/TabBugRepro

Version with bug

7.0.86

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

net7.0-windows10.0.19041.0

Did you find any workaround?

No response

Relevant log output

No response

@systemloc systemloc added the t/bug Something isn't working label Jul 30, 2023
@jsuarezruiz jsuarezruiz added area-controls-collectionview CollectionView, CarouselView, IndicatorView platform/windows 🪟 labels Jul 31, 2023
@XamlTest XamlTest added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Aug 14, 2023
@XamlTest
Copy link
Collaborator

Verified this on Visual Studio Enterprise 17.8.0 Preview 1.0. Repro on Windows 11 and iOS 16.4 .NET 8, not repro on Android 13.0-API33 with below Project:
TabBugRepro.zip

@samhouts samhouts added the area-keyboard Keyboard, soft keyboard label Aug 17, 2023
@TiberiusDRAIG
Copy link

This threw me when I first encountered it, but it kind of makes sense when you break it down; when you Tab to the CollectionView its selection takes over - you should be able to move between items with the arrow keys. Consider CollectionView is more geared up for selecting an item rather than just dynamically displaying N items. I suspect that BindableLayout on a VerticalStackLayout might be more what you're looking for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView area-keyboard Keyboard, soft keyboard platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants