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 group's panel disappears after switching children tab group's panel #299

Closed
gradepuxi22 opened this issue Jan 5, 2021 · 1 comment
Closed
Assignees
Labels
bug Things that aren't working right in the library.

Comments

@gradepuxi22
Copy link

Describe the bug
Let's say we have tab group A and tab group B. Tab group B is inside A's tab panel. Switching panel in B makes A's tab panel disappear. After going inside the same A's tab panel through a tab, we can see that the panel in B has switched correctly.

To Reproduce
Steps to reproduce the behavior:

  1. Create sl-tab-group with appropriate sl-tab and sl-tab-panel components,
  2. Put another sl-tab-group with it's children inside previous' group sl-tab-panel,
  3. While on the page, change tabs in the nested sl-tab-group.
  4. Outer's sl-tab-group panels disappear and an error appears in the console:
Uncaught TypeError: Cannot read property 'clientWidth' of undefined
    at b.syncActiveTabIndicator (p-3c2cff2d.entry.js:1)
    at b.setActiveTab (p-3c2cff2d.entry.js:1)
    at b.handleClick (p-3c2cff2d.entry.js:1)

Expected behavior
Panels switch in the nested sl-tab-group without making the whole panel disappear.

Screenshots
Before clicking the tab:
image
After clicking the tab:
image
Error message:
image

Desktop (please complete the following information):

  • OS: Ubuntu 20.04.1 LTS
  • Browser Chrome
  • Version 87.0.4280.88
@gradepuxi22 gradepuxi22 added the bug Things that aren't working right in the library. label Jan 5, 2021
@claviska
Copy link
Member

claviska commented Jan 5, 2021

Thanks for reporting this. Verified and fixed in a0e9297. I've also added a test to prevent regressions.

@claviska claviska closed this as completed Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Things that aren't working right in the library.
Projects
None yet
Development

No branches or pull requests

2 participants