By doing this, your remove the element and his id is not more reachable so the next time your server respond, turbojs won’t find the correct id and so it will not add another modal.
That’s what I am doing already, but that’s not the issue that happens.
The problem is when using links to send a turbo stream ajax request to the server. I am guessin turbo converts the call from GET to POST by adding a FORM element to the bottom of the page and then invoking the submit on that form. It doesn’t clean up the FORM element. Those form elements just accumulate at the bottom of the page. Like so.
It’s difficult to analyze without the whole code.
It seems like you append “form” to the body with the id “master_boardly” …
append so adding at the end.
I can not help you more without looking at your code.
That’s the link. Every time I click on it, it appends a FORM element. That’s all it is. I don’t have anything else.
The FORM element is created by Turbo. I am guessing, TURBO does this automatically for links that have data { local: true } set on them. It’s probably a bug right now.
I’ve been looking through the code for Turbo, trying to find where it does this FORM creation. It’s in one of the observers. I understand the concept behind this, just wondering if it should automatically clean up FORM elements it creates after fetch is completed.