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

Add React 17 "Programmatic submit" support #2518

Closed
wants to merge 1 commit into from

Conversation

AnthonyYashchuk
Copy link

@AnthonyYashchuk AnthonyYashchuk commented Aug 13, 2021

Add bubbles to Event in submit method

Reasons for making this change

Programmatic Submission does not work after upgrading to React 17.
facebook/react#20151 (comment)

fixes #2104

Checklist

  • I'm updating documentation
  • I'm adding or updating code
    • I've added and/or updated tests
    • I've updated docs if needed
  • I'm adding a new feature
    • I've updated the playground with an example use of the feature

@epicfaace
Copy link
Member

Thanks for the PR. See the discussion with @dreadheadsic / @paintedbicycle here: #2104 (comment)

Copy link
Member

@heath-freenome heath-freenome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a rather safe change @epicfaace

@epicfaace
Copy link
Member

I'm still confused by the discussion in #2104 (comment) though -- does bubbles: true actually fix it? And do we understand why it fixes it?

@dreadheadsic
Copy link

Yes that absolutely fixes the issue, i've been running it on react 17 with patch-package ever since i first opened the issue #2104

@heath-freenome
Copy link
Member

Yes that absolutely fixes the issue, i've been running it on react 17 with patch-package ever since i first opened the issue #2104

What about the form.requestSubmit() change suggested in this comment? Have you tried this?

@dreadheadsic
Copy link

Yes that absolutely fixes the issue, i've been running it on react 17 with patch-package ever since i first opened the issue #2104

What about the form.requestSubmit() change suggested in this comment? Have you tried this?

nope, didn't bother to try it as bubbles: true solves the problem.

@heath-freenome
Copy link
Member

This was fixed slightly differently in the v5 beta via this PR

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

Successfully merging this pull request may close these issues.

React 17 submit event not bubbling
4 participants