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

Collapse with multiple target stopped working in 5.3.0 #38974

Closed
3 tasks done
fisharebest opened this issue Jul 27, 2023 · 1 comment · Fixed by #38989
Closed
3 tasks done

Collapse with multiple target stopped working in 5.3.0 #38974

fisharebest opened this issue Jul 27, 2023 · 1 comment · Fixed by #38989

Comments

@fisharebest
Copy link

Prerequisites

Describe the issue

Until v5.2.3, the collapse plugin allowed a button to control several targets.
e.g. data-bs-target="#hello,#world"

Since v.5.3.0, it only appears to work with a single selector. With multiple selectors, there are no errors, but no collapsing

I did read https://getbootstrap.com/docs/5.3/migration/ to see if this was an intentional change.

Reduced test cases

5.2.3 - https://codepen.io/fisharebest/pen/dyQgwGr
5.3.0 - https://codepen.io/fisharebest/pen/GRwYPjR

What operating system(s) are you seeing the problem on?

macOS

What browser(s) are you seeing the problem on?

Firefox

What version of Bootstrap are you using?

5.3.0

@julien-deramond
Copy link
Member

Thanks for reporting this issue @fisharebest.
On my side, I don't have all the history in mind for this component so I don't know if this was something really supported voluntarily or not. The JS team will add more information later on.
In the meantime, the following could probably help you to have a workaround based on the multiple targets documentation where a common class is used as an example: https://codepen.io/julien-deramond/pen/RwqedgY

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants