htmx
htmx copied to clipboard
Closing Page containing FORM with hx-trigger=submit is incorrectly triggered and submits form.
Using HTMX 1.9.4 via Maven web jar in Spring Thymleaf template, when a user closes the form rather than filling it out and hitting submit, the form submits if the user closes the page which is not expected.
Example:
<form hx-post="/user/setPassword" hx-trigger="submit" hx-swap="outerHTML" th:object="${passwordDto}" class="mt-5">