Closed Samuelodan closed 2 months ago
fixes #25
Thank you so much for fixing this! Looking at the options you described I think the one you picked is the best solution. I'll get this deployed asap. Thank youuuu :)
Ah, I'm happy to hear you think so too. Thank you for the opportunity 😊
this change stops the button from refreshing (or being replaced) and losing its event listener for opening the modal.
I found two other ways to fix this:
I'd like to hear your thoughts on the issue. I suspected the modal controller was getting disconnected after transposing, but that wasn't the case. The connection remained, but the button defaulted to sending a post request.
I also considered changing the button method to get, using a link, or even using a plain HTML button (no request will be sent) so it wouldn't cause the server error, but I don't know how useful that would be if the button's intended function weren't happening.
Lastly, I noticed the bug was a little different in prod. It looked like what you'd get if there were no matching turbo frame in the response. Still, I reckon that's better than the error in main.