Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] Entries inside TabView with HorizontalTextAlignment set to Center or End when clicked change TabView selection to first index on Android #776

Open
meJevin opened this issue Jan 18, 2021 · 7 comments
Labels
a/TabView bug Something isn't working. Breaky break. s/unverified This issue needs verification/reproduction by a team member. PRs cannot be accepted/merged.

Comments

@meJevin
Copy link

meJevin commented Jan 18, 2021

Description

In my Xamarin.Forms project I have a MainPage (Content page inside of a Navigation page) which has a grid with a TabView.

TabView is populated with TabViewItems, containing a ContentView inside.

In those ContentViews I have a few Entry controls with HorizontalTextAlignment set to Center (or End).

When I am inside of, say, TabItemView with index != 0, and I click on those entries, TabView for some reason switches to the first TabViewItem.

Interestingly, when HorizontalTextAlignment is set to Start (which is default) this problem does not occur.

Steps to Reproduce

Described above.

Expected Behavior

I am able to interact with Entries with HorizontalTextAlignment != Start inside of TabView without switching back to the first TabItemView

Actual Behavior

Described in first section

Basic Information

  • Version with issue: 1.0.1
  • Last known good version: ?
  • IDE: VS2019 16.8.4
  • Platform Target Frameworks:
    • Android: 10 Q
  • Nuget Packages:
    • Xamarin.Forms 5.0.0.1874
    • Xamarin.Essentials 1.6.0
    • Xamarin.CommunityToolkit 1.0.1
    • Refractored.MvvmHelpers 1.6.2
  • Affected Devices: Simulator Pixel 3 x86
@meJevin meJevin added bug Something isn't working. Breaky break. s/unverified This issue needs verification/reproduction by a team member. PRs cannot be accepted/merged. labels Jan 18, 2021
@waltersh790824
Copy link

Can confirm. I have a standard picker inside of a tabview showing the same behavior. Similar environment except no Refractored.MvvmHelpers 1.6.2

@Kapusch
Copy link

Kapusch commented Apr 14, 2021

I've just noticed the same described behaviour on Android, with the last release of XCT.
And as soon as I update the HorizontalTextAlignment to Start, it works.

@KPHIBYE
Copy link

KPHIBYE commented May 26, 2021

I am experiencing the same behavior and created a minimal example project in hope to aid the resolving of this bug.
It would be great if someone could verify the bug as it is still unverified.
Edit: The bug also seems to appear when using a Picker
Edit 2: This bug seems to come from the Xamarin.Forms CarouselView that TabView uses internally. See this Issue in the Xamarin.Forms repository.

@meJevin
Copy link
Author

meJevin commented May 27, 2021

@justforfun-98, @Kapusch, @jsuarezruiz, @waltersh790824.

Update: this is actually a deeper issue. I've tested this on Android in Xamarin.Forms.

The issue is with CarouselView. When CarouselView has an Entry with HorizontalTetxAlignment set to something other than Start, upon focus it does something really weird to CarouselView, which causes it to spin out of control and scrolls to start.

No idea what's going on.

@meJevin
Copy link
Author

meJevin commented May 27, 2021

@jsuarezruiz, I'll provide a reproduction project shortly.

@esamk
Copy link

esamk commented Oct 12, 2021

Any news on this?

@QTech-Pete
Copy link

Anyone know when this will be fixed?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/TabView bug Something isn't working. Breaky break. s/unverified This issue needs verification/reproduction by a team member. PRs cannot be accepted/merged.
Projects
None yet
Development

No branches or pull requests

7 participants