You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying the examples in documentation for Requiring Confirmation for a Visit.
<ahref="/articles" data-turbo-confirm="Do you want to leave this page?">Back to articles</a><ahref="/articles/54" data-turbo-method="delete" data-turbo-confirm="Are you sure you want to delete the article?">Delete the article</a>
The data-turbo-confirm is ignored in the first link.
The second links keeps creating related forms if the the confirmation message is canceled each time the link is clicked.
The text was updated successfully, but these errors were encountered:
Self-removal after a dismissed confirmation is the latest in a long list of quirks that Turbo's handling of <a>-as-<form> elements needs to account for.
In the short term, is it possible to replace the <a data-turbo-method="delete"> with a <form>?
I see that Turbo creates the form and transfers attributes from the link to the form to have the form process data-turbo-confirm with it's submission process exiting if confirmMethod is false. And more quirks arrive as we need more data from the link element to make a cool confirmation dialog.
What about having the confirmMethod avaliable in FormLinkClickObserver and calling it before form creation?
I'm trying the examples in documentation for Requiring Confirmation for a Visit.
The data-turbo-confirm is ignored in the first link.
The second links keeps creating related forms if the the confirmation message is canceled each time the link is clicked.
The text was updated successfully, but these errors were encountered: