Ok I tested outside of codepen in Firefox and I can see the error message.
I also note that each time you click you are getting an extra backdrop added that is never removed and you can see in the devtools numerous backdrops.
The bootstrap5 documentations states that they only support one modal at a time so if you want multiple modals you would be better off rolling your own code to handle the functionality that you want.
I’m afraid my JS is not good enough to help debug that error so hopefully one of the JS gurus around here will drop by now to give some better advice ![]()
