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

Tabs in section 'Platform specific initialization' are behaving strangely #437

Open
dcarapic opened this issue Jul 4, 2024 · 3 comments

Comments

@dcarapic
Copy link

dcarapic commented Jul 4, 2024

Type of issue

Other (describe below)

Description

Clicking individual tabs on the within the 'Platform specific initialization' section does not work correctly.
firefox_2024-07-04_08-47-01

Page URL

https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/alerts/toast?tabs=tizen%2Cmacios%2Candroid

Content source URL

https://github.com/MicrosoftDocs/CommunityToolkit/blob/main/docs/maui/alerts/toast.md

Document Version Independent Id

8536c827-5a35-ebdd-51fd-0a184bfe1d69

Article author

@VladislavAntonyuk

Metadata

  • ID: 8536c827-5a35-ebdd-51fd-0a184bfe1d69
  • Service: dotnet-communitytoolkit
  • Sub-service: dotnet-maui-community-toolkit
@bijington
Copy link
Collaborator

@davidbritch do you have any idea what might cause this?

@davidbritch
Copy link
Contributor

@bijington

The URL gives away what the problem is: https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/alerts/toast?tabs=tizen%2Cmacios%2Candroid - it's trying to display multiple tabs at once, rather than a single tab. This occurs because you have unbalanced tab groups on the page. The first tab group has 4 tabs, the second tab group has 2 tabs (and one of them uses a different tab id). So, for example, if you delete the second tab group on the page (with 2 tabs), the first tab group works correctly. The first tab group also works correctly if you have four tabs in the second tab group, and use the same tab ids.

So ultimately the solution is to balance up the two tab groups.

@davidbritch
Copy link
Contributor

@bijington

There's a second solution: ensure the tab ids in one of the tab groups are different to the tab ids in the other group. With this approach you can keep 4 tabs in the first group, and 2 in the second.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants