-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Closed
Labels
Description
What version of Remix are you using?
7.30.0
Steps to Reproduce
Be on a page with a fragment like /my-page#content
Now add a form:
<Form method="post">
<button type="submit">Go for it</button>
</Form>
Now press the button. It will go to /my-page
by removing the fragment, without posting the form.
It doesn't matter if an explicit action is present:
<Form method="post" action="/my-page">
<button type="submit">Go for it</button>
</Form>
Expected Behavior
It ignores fragments / anchors because they should be ignored when doing a form post.
Actual Behavior
With JavaScript: It scrolls the page to the top of the page without posting.
Without JavaScript: It works as expected.
liegeandlief