Skip to content

Commit

Permalink
Mark forms created for links with data-turbo-method as hidden (#404)
Browse files Browse the repository at this point in the history
  • Loading branch information
willcosgrove authored Sep 23, 2021
1 parent 3c726f7 commit 318d8aa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/core/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ export class Session implements FormSubmitObserverDelegate, HistoryDelegate, Lin
const form = document.createElement("form")
form.method = linkMethod
form.action = link.getAttribute("href") || "undefined"
form.hidden = true

link.parentNode?.insertBefore(form, link)
return dispatch("submit", { cancelable: true, target: form })
Expand Down

0 comments on commit 318d8aa

Please sign in to comment.