react icon indicating copy to clipboard operation
react copied to clipboard

ReactDOM: Fix missing form data when the submitter is outside the form

Open jupapios opened this issue 1 year ago • 4 comments

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. Screenshot 2024-01-22 at 8 45 20 PM

jupapios avatar Jan 23 '24 02:01 jupapios

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

react-sizebot avatar Jan 23 '24 02:01 react-sizebot

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.

github-actions[bot] avatar Apr 23 '24 18:04 github-actions[bot]

bump

jupapios avatar Apr 23 '24 18:04 jupapios

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 avatar Apr 23 '24 19:04 eps1lon

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.

jupapios avatar May 01 '24 21:05 jupapios