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

Fix uncontrolled radios #10186

Merged
merged 3 commits into from Jul 24, 2017
Merged

Fix uncontrolled radios #10186

merged 3 commits into from Jul 24, 2017

Conversation

jquense
Copy link
Contributor

@jquense jquense commented Jul 14, 2017

backport of #10156, not sure what the deal is with prettier but when I ran it, it gave me a ton of edits

@nhunzaker
Copy link
Contributor

Just waiting on CI.

@aweary
Copy link
Contributor

aweary commented Jul 14, 2017

I think we're going to have to update the 15.6-dev branch with the Prettier changes. I was having the same problem with #10032

@gaearon
Copy link
Collaborator

gaearon commented Jul 14, 2017

If 15.6-dev has diverged from 15-stable, maybe we should force push it to match 15-stable? Since there hasn't been another 15.x release since.

@gaearon
Copy link
Collaborator

gaearon commented Jul 16, 2017

Let's wait with merging until we figure out why #10156 broke for us.

@nhunzaker
Copy link
Contributor

nhunzaker commented Jul 16, 2017 via email

@jquense
Copy link
Contributor Author

jquense commented Jul 18, 2017

fyi this should be fine as is. I don't think we want to backport #10208 and the Stack only v15 won't have the same bug, since it doesn't contain the offending logic branch

@gaearon
Copy link
Collaborator

gaearon commented Jul 18, 2017

Can we fix CI before merging? I would also prefer that we cherry-pick that test I added.

@jquense
Copy link
Contributor Author

jquense commented Jul 19, 2017

I can cherry-pick that test. For CI I think we need to fixup the branch does someone want to do that? I'd prefer one of my first pushes to not be a force push :P lest the git gods betray me.

@gaearon
Copy link
Collaborator

gaearon commented Jul 19, 2017

I force pushed to 15.6-dev so it should be good now.

@gaearon
Copy link
Collaborator

gaearon commented Jul 19, 2017

Can you please rebase?

@jquense jquense mentioned this pull request Jul 24, 2017
12 tasks
@jquense jquense merged commit b1d52b6 into facebook:15.6-dev Jul 24, 2017
@jquense jquense deleted the fix-radios-15 branch July 24, 2017 18:20

// We also check that we haven't missed a value update, such as a
// Radio group shifting the checked value to another named radio input.
inputValueTracking.updateValueIfChanged(this);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

So in 15.6.2 this fix is no longer working...broadly when an radio changes it triggers an update in related (same name) radio inputs manually. Originally (unless i'm going crazy) those other updates hit this branch, .e.g radio1 triggered updateComponent and the other radios reset their inputTracking. Now it seems like this branch is missed entirely and ReactDOMInput.updateWrapper is called directly...I could totally be going crazy and this never worked originally but i'm certain we all tested it...

CC @aweary @nhunzaker

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we all tested this. The fixture in it's current state on 15.6.1 is completely broken on older builds of the fixtures (http://react-dom-test-fixtures.surge.sh/). Can we attribute this to a mixup pulling this code on to 15.x?

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

Successfully merging this pull request may close these issues.

None yet

5 participants