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 between modals has issue #34691

Closed
sameerparmar opened this issue Aug 5, 2021 · 7 comments · Fixed by #34701
Closed

Toggle between modals has issue #34691

sameerparmar opened this issue Aug 5, 2021 · 7 comments · Fixed by #34701
Projects

Comments

@sameerparmar
Copy link

sameerparmar commented Aug 5, 2021

Toggle between modals has an issue it can't close the first modal and the second modal open on it. it was worked fine on Bootstrap Version 5.0.0. But issue faced in the latest version 5.1.0.
Screenshot 2021-08-05 at 6 30 02 PM

@ffoodd
Copy link
Member

ffoodd commented Aug 5, 2021

Bug reports must include a live demo of the issue. Per our contributing guidelines, please create a reduced test case via CodePen or JS Bin and report back with your link, Bootstrap version, and specific browser and operating system details.


This is a saved reply.

@SpunkyAmigo
Copy link

I had the exact same issue. The example itself is not working in Boostrap.

@mdo
Copy link
Member

mdo commented Aug 5, 2021

Yeah the docs demo is broken. I think something changed with the modal triggers/toggles and we need to update this. @GeoSot might know exactly what changed.

@GeoSot
Copy link
Member

GeoSot commented Aug 6, 2021

Yes @mdo you are right.
#33403 was the first commit that changed this attitude.

On our docs we have used some tricky markup

 <button class="btn btn-primary" data-bs-target="#exampleModalToggle" data-bs-toggle="modal" data-bs-dismiss="modal">Back to first</button>
    

As bs-dismiss wasn't searching for data-target it was closing the second modal, and bs-toggle was toggling the first modal.
I will make a patch, to fix it and we can decide how to proceed

@XhmikosR XhmikosR added this to In progress in v5.1.1 Aug 10, 2021
v5.1.1 automation moved this from In progress to Done Aug 10, 2021
@thoasty-dev
Copy link

Isnt this a breaking change for anybody that uses modals inside modals?

@XhmikosR
Copy link
Member

@thoasty-dev please make a new issue.

@Sun3
Copy link

Sun3 commented Aug 28, 2021

It's also broken for me too. Any ideas when I fix might be released?

Thanks...

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

Successfully merging a pull request may close this issue.

8 participants