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

Toggle switches are broken within segmented controls #838

Open
thewax opened this issue Aug 9, 2016 · 1 comment
Open

Toggle switches are broken within segmented controls #838

thewax opened this issue Aug 9, 2016 · 1 comment

Comments

@thewax
Copy link

thewax commented Aug 9, 2016

Add a toggle switch inside a segmented control body and it will remove all "active" classes from the toggles within. This is because the class selector is removing any and all "active" classes from within that DIV.

@eradin
Copy link

eradin commented Jan 12, 2017

This is a bug. To be more precise, the event should only remove "active" from control-content elements within that control set. But instead, it removes "active" from all elements contained in the parent container (activeBodies = targetBody.parentNode.querySelectorAll(classSelector);). If the parent container is 'content', the active class will be removed from all elements that use that class. So, any control like toggle or even a nested segment control will not work properly since each time a tab is clicked, all active classes are removed.

This really makes segment controls useful in limited implementations.

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

No branches or pull requests

2 participants