Skip to content

Commit f21dee5

Browse files
committed
Remove dynamic www flag for disableInputAttributeSyncing (#28703)
Remove dynamic www flag for disableInputAttributeSyncing DiffTrain build for [7659c4d](7659c4d)
1 parent 4af8db7 commit f21dee5

13 files changed

+180
-500
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7319c61b18274ee7e7c20bd2e533b93c922d8fe0
1+
7659c4d9e0e4de2ec758c9a03ad7cbf07fc696d0

compiled/facebook-www/ReactART-dev.classic.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ if (__DEV__) {
6666
return self;
6767
}
6868

69-
var ReactVersion = "19.0.0-www-classic-2807bf19";
69+
var ReactVersion = "19.0.0-www-classic-9edd2970";
7070

7171
var LegacyRoot = 0;
7272
var ConcurrentRoot = 1;
@@ -192,7 +192,7 @@ if (__DEV__) {
192192
var enableProfilerTimer = true;
193193
var enableProfilerCommitHooks = true;
194194
var enableProfilerNestedUpdatePhase = true;
195-
var enableAsyncActions = true; // Logs additional User Timing API marks for use with an experimental profiling tool.
195+
var enableAsyncActions = true;
196196

197197
var enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler;
198198

compiled/facebook-www/ReactART-dev.modern.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ if (__DEV__) {
6666
return self;
6767
}
6868

69-
var ReactVersion = "19.0.0-www-modern-3f8cc689";
69+
var ReactVersion = "19.0.0-www-modern-5aabb0c4";
7070

7171
var LegacyRoot = 0;
7272
var ConcurrentRoot = 1;
@@ -192,7 +192,7 @@ if (__DEV__) {
192192
var enableProfilerTimer = true;
193193
var enableProfilerCommitHooks = true;
194194
var enableProfilerNestedUpdatePhase = true;
195-
var enableAsyncActions = true; // Logs additional User Timing API marks for use with an experimental profiling tool.
195+
var enableAsyncActions = true;
196196

197197
var enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler;
198198

compiled/facebook-www/ReactDOM-dev.classic.js

Lines changed: 9 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,7 @@ if (__DEV__) {
122122
// Re-export dynamic flags from the www version.
123123
var dynamicFeatureFlags = require("ReactFeatureFlags");
124124

125-
var disableInputAttributeSyncing =
126-
dynamicFeatureFlags.disableInputAttributeSyncing,
127-
disableIEWorkarounds = dynamicFeatureFlags.disableIEWorkarounds,
125+
var disableIEWorkarounds = dynamicFeatureFlags.disableIEWorkarounds,
128126
enableBigIntSupport = dynamicFeatureFlags.enableBigIntSupport,
129127
enableTrustedTypesIntegration =
130128
dynamicFeatureFlags.enableTrustedTypesIntegration,
@@ -158,7 +156,7 @@ if (__DEV__) {
158156
var enableProfilerTimer = true;
159157
var enableProfilerCommitHooks = true;
160158
var enableProfilerNestedUpdatePhase = true;
161-
var enableAsyncActions = true; // Logs additional User Timing API marks for use with an experimental profiling tool.
159+
var enableAsyncActions = true;
162160

163161
var enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler;
164162
var enableSuspenseCallback = true;
@@ -4124,16 +4122,7 @@ if (__DEV__) {
41244122
node.removeAttribute("value");
41254123
}
41264124

4127-
if (disableInputAttributeSyncing) {
4128-
// When not syncing the value attribute, React only assigns a new value
4129-
// whenever the defaultValue React prop has changed. When not present,
4130-
// React does nothing
4131-
if (defaultValue != null) {
4132-
setDefaultValue(node, type, getToStringValue(defaultValue));
4133-
} else if (lastDefaultValue != null) {
4134-
node.removeAttribute("value");
4135-
}
4136-
} else {
4125+
{
41374126
// When syncing the value attribute, the value comes from a cascade of
41384127
// properties:
41394128
// 1. The value React property
@@ -4148,16 +4137,7 @@ if (__DEV__) {
41484137
}
41494138
}
41504139

4151-
if (disableInputAttributeSyncing) {
4152-
// When not syncing the checked attribute, the attribute is directly
4153-
// controllable from the defaultValue React property. It needs to be
4154-
// updated as new props come in.
4155-
if (defaultChecked == null) {
4156-
node.removeAttribute("checked");
4157-
} else {
4158-
node.defaultChecked = !!defaultChecked;
4159-
}
4160-
} else {
4140+
{
41614141
// When syncing the checked attribute, it only changes when it needs
41624142
// to be removed, such as transitioning from a checkbox into a text input
41634143
if (checked == null && defaultChecked != null) {
@@ -4231,26 +4211,7 @@ if (__DEV__) {
42314211
// from being lost during SSR hydration.
42324212

42334213
if (!isHydrating) {
4234-
if (disableInputAttributeSyncing) {
4235-
// When not syncing the value attribute, the value property points
4236-
// directly to the React prop. Only assign it if it exists.
4237-
if (value != null) {
4238-
// Always assign on buttons so that it is possible to assign an
4239-
// empty string to clear button text.
4240-
//
4241-
// Otherwise, do not re-assign the value property if is empty. This
4242-
// potentially avoids a DOM write and prevents Firefox (~60.0.1) from
4243-
// prematurely marking required inputs as invalid. Equality is compared
4244-
// to the current value in case the browser provided value is not an
4245-
// empty string.
4246-
if (
4247-
isButton ||
4248-
toString(getToStringValue(value)) !== node.value
4249-
) {
4250-
node.value = toString(getToStringValue(value));
4251-
}
4252-
}
4253-
} else {
4214+
{
42544215
// When syncing the value attribute, the value property should use
42554216
// the wrapperState._initialValue property. This uses:
42564217
//
@@ -4263,13 +4224,7 @@ if (__DEV__) {
42634224
}
42644225
}
42654226

4266-
if (disableInputAttributeSyncing) {
4267-
// When not syncing the value attribute, assign the value attribute
4268-
// directly from the defaultValue React property (when present)
4269-
if (defaultValue != null) {
4270-
node.defaultValue = defaultValueStr;
4271-
}
4272-
} else {
4227+
{
42734228
// Otherwise, the value attribute is synchronized to the property,
42744229
// so we assign defaultValue to the same thing as the value property
42754230
// assignment step above.
@@ -4296,15 +4251,7 @@ if (__DEV__) {
42964251
node.checked = !!initialChecked;
42974252
}
42984253

4299-
if (disableInputAttributeSyncing) {
4300-
// Only assign the checked attribute if it is defined. This saves
4301-
// a DOM write when controlling the checked attribute isn't needed
4302-
// (text inputs, submit/reset)
4303-
if (defaultChecked != null) {
4304-
node.defaultChecked = !node.defaultChecked;
4305-
node.defaultChecked = !!defaultChecked;
4306-
}
4307-
} else {
4254+
{
43084255
// When syncing the checked attribute, both the checked property and
43094256
// attribute are assigned at the same time using defaultChecked. This uses:
43104257
//
@@ -36333,7 +36280,7 @@ if (__DEV__) {
3633336280
return root;
3633436281
}
3633536282

36336-
var ReactVersion = "19.0.0-www-classic-ae62c2e6";
36283+
var ReactVersion = "19.0.0-www-classic-80b168f2";
3633736284

3633836285
function createPortal$1(
3633936286
children,
@@ -38562,7 +38509,7 @@ if (__DEV__) {
3856238509
return;
3856338510
}
3856438511

38565-
if (!disableInputAttributeSyncing) {
38512+
{
3856638513
var isControlled = props.value != null;
3856738514

3856838515
if (isControlled) {

compiled/facebook-www/ReactDOM-dev.modern.js

Lines changed: 9 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,7 @@ if (__DEV__) {
118118
// Re-export dynamic flags from the www version.
119119
var dynamicFeatureFlags = require("ReactFeatureFlags");
120120

121-
var disableInputAttributeSyncing =
122-
dynamicFeatureFlags.disableInputAttributeSyncing,
123-
disableIEWorkarounds = dynamicFeatureFlags.disableIEWorkarounds,
121+
var disableIEWorkarounds = dynamicFeatureFlags.disableIEWorkarounds,
124122
enableBigIntSupport = dynamicFeatureFlags.enableBigIntSupport,
125123
enableTrustedTypesIntegration =
126124
dynamicFeatureFlags.enableTrustedTypesIntegration,
@@ -154,7 +152,7 @@ if (__DEV__) {
154152
var enableProfilerTimer = true;
155153
var enableProfilerCommitHooks = true;
156154
var enableProfilerNestedUpdatePhase = true;
157-
var enableAsyncActions = true; // Logs additional User Timing API marks for use with an experimental profiling tool.
155+
var enableAsyncActions = true;
158156

159157
var enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler;
160158
var enableSuspenseCallback = true;
@@ -3979,16 +3977,7 @@ if (__DEV__) {
39793977
node.removeAttribute("value");
39803978
}
39813979

3982-
if (disableInputAttributeSyncing) {
3983-
// When not syncing the value attribute, React only assigns a new value
3984-
// whenever the defaultValue React prop has changed. When not present,
3985-
// React does nothing
3986-
if (defaultValue != null) {
3987-
setDefaultValue(node, type, getToStringValue(defaultValue));
3988-
} else if (lastDefaultValue != null) {
3989-
node.removeAttribute("value");
3990-
}
3991-
} else {
3980+
{
39923981
// When syncing the value attribute, the value comes from a cascade of
39933982
// properties:
39943983
// 1. The value React property
@@ -4003,16 +3992,7 @@ if (__DEV__) {
40033992
}
40043993
}
40053994

4006-
if (disableInputAttributeSyncing) {
4007-
// When not syncing the checked attribute, the attribute is directly
4008-
// controllable from the defaultValue React property. It needs to be
4009-
// updated as new props come in.
4010-
if (defaultChecked == null) {
4011-
node.removeAttribute("checked");
4012-
} else {
4013-
node.defaultChecked = !!defaultChecked;
4014-
}
4015-
} else {
3995+
{
40163996
// When syncing the checked attribute, it only changes when it needs
40173997
// to be removed, such as transitioning from a checkbox into a text input
40183998
if (checked == null && defaultChecked != null) {
@@ -4086,26 +4066,7 @@ if (__DEV__) {
40864066
// from being lost during SSR hydration.
40874067

40884068
if (!isHydrating) {
4089-
if (disableInputAttributeSyncing) {
4090-
// When not syncing the value attribute, the value property points
4091-
// directly to the React prop. Only assign it if it exists.
4092-
if (value != null) {
4093-
// Always assign on buttons so that it is possible to assign an
4094-
// empty string to clear button text.
4095-
//
4096-
// Otherwise, do not re-assign the value property if is empty. This
4097-
// potentially avoids a DOM write and prevents Firefox (~60.0.1) from
4098-
// prematurely marking required inputs as invalid. Equality is compared
4099-
// to the current value in case the browser provided value is not an
4100-
// empty string.
4101-
if (
4102-
isButton ||
4103-
toString(getToStringValue(value)) !== node.value
4104-
) {
4105-
node.value = toString(getToStringValue(value));
4106-
}
4107-
}
4108-
} else {
4069+
{
41094070
// When syncing the value attribute, the value property should use
41104071
// the wrapperState._initialValue property. This uses:
41114072
//
@@ -4118,13 +4079,7 @@ if (__DEV__) {
41184079
}
41194080
}
41204081

4121-
if (disableInputAttributeSyncing) {
4122-
// When not syncing the value attribute, assign the value attribute
4123-
// directly from the defaultValue React property (when present)
4124-
if (defaultValue != null) {
4125-
node.defaultValue = defaultValueStr;
4126-
}
4127-
} else {
4082+
{
41284083
// Otherwise, the value attribute is synchronized to the property,
41294084
// so we assign defaultValue to the same thing as the value property
41304085
// assignment step above.
@@ -4151,15 +4106,7 @@ if (__DEV__) {
41514106
node.checked = !!initialChecked;
41524107
}
41534108

4154-
if (disableInputAttributeSyncing) {
4155-
// Only assign the checked attribute if it is defined. This saves
4156-
// a DOM write when controlling the checked attribute isn't needed
4157-
// (text inputs, submit/reset)
4158-
if (defaultChecked != null) {
4159-
node.defaultChecked = !node.defaultChecked;
4160-
node.defaultChecked = !!defaultChecked;
4161-
}
4162-
} else {
4109+
{
41634110
// When syncing the checked attribute, both the checked property and
41644111
// attribute are assigned at the same time using defaultChecked. This uses:
41654112
//
@@ -36181,7 +36128,7 @@ if (__DEV__) {
3618136128
return root;
3618236129
}
3618336130

36184-
var ReactVersion = "19.0.0-www-modern-7dc0b27f";
36131+
var ReactVersion = "19.0.0-www-modern-e4bc2307";
3618536132

3618636133
function createPortal$1(
3618736134
children,
@@ -39412,7 +39359,7 @@ if (__DEV__) {
3941239359
return;
3941339360
}
3941439361

39415-
if (!disableInputAttributeSyncing) {
39362+
{
3941639363
var isControlled = props.value != null;
3941739364

3941839365
if (isControlled) {

0 commit comments

Comments
 (0)