Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submitting a form with [target=_blank] ignores the target #754

Closed
martinzamuner opened this issue Oct 7, 2022 · 0 comments
Closed

Submitting a form with [target=_blank] ignores the target #754

martinzamuner opened this issue Oct 7, 2022 · 0 comments

Comments

@martinzamuner
Copy link

When submitting the following form

<form id="targeted-form-post" method="post" action="/__turbo/redirect" target="_blank">
  <input type="hidden" name="path" value="/src/tests/fixtures/one.html">
  <input type="submit" id="form-post-submit" value="Submit with target"/>
</form>

Turbo treats it as a normal submission and ignores the target. If data-turbo="false" is added to the form, it behaves as I would expect, triggering the submission from a new tab/window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant