react
react copied to clipboard
ReactDOM: Fix missing form data when the submitter is outside the form
Summary
Fixes https://github.com/facebook/react/issues/27391
Fix form actions to include the name
and value
from the form-associated element
when it is located outside the form.
How did you test this change?
- Existing test has been modified to include the case from the issue..
- Manually tested running Next.js locally, linked to a local build of
react-dom
.
Comparing: 190cc990e01e5131a6b26f1a3212444cebd794e2...0b4abb203a39b51b7e3310cebb9262126729fd7c
Critical size changes
Includes critical production bundles, as well as any change greater than 2%:
Name | +/- | Base | Current | +/- gzip | Base gzip | Current gzip |
---|---|---|---|---|---|---|
oss-stable/react-dom/cjs/react-dom.production.js | = | 6.66 kB | 6.66 kB | = | 1.82 kB | 1.82 kB |
oss-experimental/react-dom/cjs/react-dom.production.js | = | 6.67 kB | 6.67 kB | = | 1.83 kB | 1.83 kB |
facebook-www/ReactDOM-prod.classic.js | +0.02% | 591.11 kB | 591.22 kB | +0.02% | 103.94 kB | 103.96 kB |
facebook-www/ReactDOM-prod.modern.js | +0.02% | 567.33 kB | 567.44 kB | +0.02% | 100.34 kB | 100.36 kB |
test_utils/ReactAllWarnings.js | Deleted | 64.26 kB | 0.00 kB | Deleted | 16.02 kB | 0.00 kB |
Significant size changes
Includes any change greater than 0.2%:
Expand to show
Name | +/- | Base | Current | +/- gzip | Base gzip | Current gzip |
---|---|---|---|---|---|---|
test_utils/ReactAllWarnings.js | Deleted | 64.26 kB | 0.00 kB | Deleted | 16.02 kB | 0.00 kB |
Generated by :no_entry_sign: dangerJS against 0b4abb203a39b51b7e3310cebb9262126729fd7c
This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated.
bump
Can you prepare a codesandbox using a build from this branch (https://react-builds.vercel.app/api/prs/28056/packages-react-dom) to verify this works in a browser? Our testing environment (JSDOM) is fairly unreliable in this area.
Can you prepare a codesandbox using a build from this branch (https://react-builds.vercel.app/api/prs/28056/packages-react-dom) to verify this works in a browser? Our testing environment (JSDOM) is fairly unreliable in this area.
@eps1lon you were right! it was simpler to check for the id of the form, I just updated the PR and created two sandboxes, both with the same code just different builds.
- Sandbox with the bug, it uses the built from the previous commit (by the time of creating the sandbox).
- Sandbox with the fix (uses the commit from this PR)