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 for #7170 #7486

Merged
merged 4 commits into from
Aug 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/renderers/dom/client/wrappers/ReactDOMInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ var ReactDOMInput = {
// Make sure we set .step before .value (setting .value before .step
// means .value is rounded on mount, based upon step precision)
step: undefined,
// Make sure we set .min & .max before .value (to ensure proper order
// in corner cases such as min or max deriving from value, e.g. Issue #7170)
min: undefined,
max: undefined,
}, DisabledInputUtils.getHostProps(inst, props), {
defaultChecked: undefined,
defaultValue: undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ describe('ReactDOMInput', function() {
);
});

it('sets type and step before value always', function() {
it('sets type, step, min, max before value always', function() {
if (!ReactDOMFeatureFlags.useCreateElement) {
return;
}
Expand All @@ -769,10 +769,10 @@ describe('ReactDOMInput', function() {
'set data-reactroot',
'set type',
'set step',
'set value',
'set min',
'set max',
'set value',
'set value',
'set checked',
'set checked',
]);
Expand Down