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

fix: setting active tab does not always update active indicator in fast-tabs #5296

Closed
brianehenry opened this issue Oct 19, 2021 · 2 comments
Labels
area:fast-foundation Pertains to fast-foundation bug A bug community:request Issues specifically reported by a member of the community. status:needs-investigation Needs additional investigation warning:stale No recent activity within a reasonable amount of time

Comments

@brianehenry
Copy link
Contributor

brianehenry commented Oct 19, 2021

🐛 Bug Report

Setting the active tab programmatically with the activeid property does not always position the active tab indicator correctly.

💻 Repro or Code Sample

<fast-tabs id="tabs">
    <fast-tab slot="tab" id="1">Tab one</fast-tab>
    <fast-tab slot="tab" id="2">Tab two</fast-tab>
    <fast-tab slot="tab" id="3">Tab three</fast-tab>
    <fast-tab-panel slot="tabpanel">Tab panel 1</fast-tab-panel>
    <fast-tab-panel slot="tabpanel">Tab panel 2</fast-tab-panel>
    <fast-tab-panel slot="tabpanel">Tab panel 3</fast-tab-panel>
</fast-tabs>
const tabs = document.getElementById('tabs');
tabs.activeid = '2';
// Active tab is now tab two, and active indicator is moved appropriately
tabs.activeid = '1';
// Active tab is now tab one, but active indicator is still positioned under tab two

🤔 Expected Behavior

Active indicator moves to active tab when active tab is set via the activeid property.

😯 Current Behavior

Active indicator is sometimes incorrectly positioned after setting the activeid property.

tab-active-indicator

💁 Possible Solution

🔦 Context

I want to be able to set the active tab programmatically.

🌍 Your Environment

  • OS & Device: Windows PC
  • Browser: Microsoft Edge
  • Version: @microsoft/fast-foundation: 2.12.0
@brianehenry brianehenry added the status:triage New Issue - needs triage label Oct 19, 2021
@chrisdholt chrisdholt added area:fast-components area:fast-foundation Pertains to fast-foundation bug A bug community:request Issues specifically reported by a member of the community. status:needs-investigation Needs additional investigation and removed status:triage New Issue - needs triage labels Oct 19, 2021
@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the warning:stale No recent activity within a reasonable amount of time label Apr 16, 2022
@chrisdholt
Copy link
Member

Closing as the fast components package has been deprecated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:fast-foundation Pertains to fast-foundation bug A bug community:request Issues specifically reported by a member of the community. status:needs-investigation Needs additional investigation warning:stale No recent activity within a reasonable amount of time
Projects
None yet
Development

No branches or pull requests

2 participants