Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Nested list inside of Tabs component breaks tab switching #53

Closed
slbls opened this issue Oct 10, 2018 · 2 comments
Closed

Nested list inside of Tabs component breaks tab switching #53

slbls opened this issue Oct 10, 2018 · 2 comments
Labels
Milestone

Comments

@slbls
Copy link

slbls commented Oct 10, 2018

Versions
BulmaJS: 0.6.0
Browser: Firefox 63.0b12 (64-bit)
Operating system: Windows 10 Pro

Describe the bug
If there is a list inside of a .tabs-content > ul > li, tab switching stops working. Clicking the first tab works correctly, but clicking on consecutive tabs does not reveal their content.

To reproduce
Click the second tab with the below HTML—it will not reveal the second tab's assigned content.

<div class="tab-wrapper">
	<div class="tabs">
		<ul>
			<li class="is-active">
				<a>Tab 1</a>
			</li>
			<li>
				<a>Tab 2</a>
			</li>
		</ul>
	</div>

	<div class="tabs-content">
		<ul>
			<li class="is-active">
				<ul>
					<li>1</li>
					<li>2</li>
					<li>3</li>
				</ul>
			</li>

			<li>
				Sample text
			</li>
		</ul>
	</div>
</div>

Expected behavior
When a ol or ul with li children is a child of .tabs-content > ul > li, clicking a tab should reveal its content.

Potential fix
This may be as simple as changing the Tabs component's findNavItems and findContentItems queries to > ul > li (instead of just li), so that only the immediate child list items of .tabs and .tabs-content are selected.

@VizuaaLOG VizuaaLOG added the bug label Oct 10, 2018
@VizuaaLOG VizuaaLOG added this to the 0.7.0 milestone Oct 10, 2018
@VizuaaLOG
Copy link
Owner

Thank you for reporting this. It was definetly and oversight. And your potential fix is the way forward.

@VizuaaLOG
Copy link
Owner

This has been fixed in master 79d32f1. Will be included in the next release.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants