ampproject / ampproject/amphtml
Nested tab not working
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
### Description
While creating nested Tabs using amp-selector. The outer and inner both Tabs are not working properly.
Scenario1: The outer Tab is default selected but still the tab content is not visible, After clicking again on selected Tab content gets visible
Scenario2: when outer content gets visible inner tab default selection is not working. Need to click on inner tab to select again still the content is not visible , then again need to select the same tab then after the content gets visible.
### Reproduction Steps
While creating nested Tabs using amp-selector. The outer and inner both Tabs are not working properly.
Scenario1: The outer Tab is default selected but still the tab content is not visible, After clicking again on selected Tab content gets visible
Scenario2: when outer content gets visible inner tab default selection is not working. Need to click on inner tab to select again still the content is not visible , then again need to select the same tab then after the content gets visible.
Attached issue description with screenshot.
Kindly provide any solution here.
[tab_issue.docx](https://github.com/ampproject/amphtml/files/7098269/tab_issue.docx)
### Relevant Logs
_No response_
### Browser(s) Affected
_No response_
### OS(s) Affected
_No response_
### Device(s) Affected
_No response_
### AMP Version Affected
_No response_
Contributor guide
Research direction
Start by reproducing the nested amp-selector cases described in the issue and compare the behavior with the attached tab_issue.docx. Then locate the amp-selector implementation and its existing tests, if present, to determine where default selection and nested content visibility diverge. Done means both outer and inner default-selected tabs display their content without repeated clicks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100