-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Comments
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. |
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.
The text was updated successfully, but these errors were encountered: