I have a modal with a button whose class sets up an onclick listener.
Before the modal is open, I see that the listener is enabled (via the Chrome inspector).
When I open the modal, the button does not work, and I see that the listener is gone from it.
The way you have structured the page, is that you have the exact same form on the page multiple times.
And these forms have the same id.
This will cause errors.
Try disabling the Modals system plugin and reload that page.
Then you can see those duplicate forms in the page more clearly.
I fixed the duplicate IDs (reusing the same Joomla form definition incorrectly), and I still have the problem.
I have distilled this down to a very simple case. Use the link below (on the same site), and you will see two buttons. One has a listener and displays an alert when clicked, and the other opens a modal. The modal has a button with a listener to display an alert when clicked.
As before, clicking the button in the modal does nothing. What I see in the Inspector is that the attached listener for the button disappears when the modal is opened.
There is a template problem generating duplicate IDs for login forms, but I'm guessing that has no impact here.