Skip to content

fix(scraps): skip redundant form attribute on SubmitButton#119135

Merged
natemoo-re merged 4 commits into
masterfrom
nm/forms/fix-safari
Jul 7, 2026
Merged

fix(scraps): skip redundant form attribute on SubmitButton#119135
natemoo-re merged 4 commits into
masterfrom
nm/forms/fix-safari

Conversation

@natemoo-re

@natemoo-re natemoo-re commented Jul 7, 2026

Copy link
Copy Markdown
Member

Safari doesn't submit a form when a <button type="submit"> has an explicit form attribute pointing at its own parent <form>. It treats the redundant association as targeting a form that doesn't exist.

SubmitButton was unconditionally setting form={form.formId}, but since it's always rendered inside <form id={form.formId}> via AppForm/FormWrapper, the attribute was redundant. Chrome/Firefox silently ignore the redundancy; Safari does not.

This adds an InsideFormElement context provided by FormWrapper so SubmitButton only sets the form attribute when it's actually rendered outside the <form> element — preserving support for that pattern without breaking Safari.

Closes #119114
Closes DE-1353

@natemoo-re
natemoo-re requested a review from a team as a code owner July 7, 2026 17:59
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 7, 2026
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Story previews

Preview the stories changed in this PR on the Vercel deployment:

Preview deployment: https://sentry-fd01qdcxx.sentry.dev

@linear-code

linear-code Bot commented Jul 7, 2026

Copy link
Copy Markdown

DE-1353

@natemoo-re
natemoo-re requested a review from a team July 7, 2026 21:07
@natemoo-re natemoo-re changed the title fix(scraps): skip redundant form attribute on SubmitButton in Safari fix(scraps): skip redundant form attribute on SubmitButton Jul 7, 2026
@natemoo-re
natemoo-re enabled auto-merge (squash) July 7, 2026 21:13
@natemoo-re
natemoo-re merged commit 41c9b7c into master Jul 7, 2026
76 of 77 checks passed
@natemoo-re
natemoo-re deleted the nm/forms/fix-safari branch July 7, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Personal token not displayed after creation in Safari

2 participants