diff --git a/packages/react-dom-bindings/src/client/ReactDOMComponent.js b/packages/react-dom-bindings/src/client/ReactDOMComponent.js index a3a8d6a338190..00775ff4cb665 100644 --- a/packages/react-dom-bindings/src/client/ReactDOMComponent.js +++ b/packages/react-dom-bindings/src/client/ReactDOMComponent.js @@ -802,7 +802,6 @@ export function setInitialProperties( break; } case 'input': { - initInput(domElement, props); // We listen to this event in case to ensure emulated bubble // listeners still fire for the invalid event. listenToNonDelegatedEvent('invalid', domElement); @@ -863,11 +862,11 @@ export function setInitialProperties( // TODO: Make sure we check if this is still unmounted or do any clean // up necessary since we never stop tracking anymore. track((domElement: any)); + initInput(domElement, props); postInitInput(domElement, props, false); return; } case 'select': { - initSelect(domElement, props); // We listen to this event in case to ensure emulated bubble // listeners still fire for the invalid event. listenToNonDelegatedEvent('invalid', domElement); @@ -890,11 +889,11 @@ export function setInitialProperties( } } } + initSelect(domElement, props); postInitSelect(domElement, props); return; } case 'textarea': { - initTextarea(domElement, props); // We listen to this event in case to ensure emulated bubble // listeners still fire for the invalid event. listenToNonDelegatedEvent('invalid', domElement); @@ -933,6 +932,7 @@ export function setInitialProperties( // TODO: Make sure we check if this is still unmounted or do any clean // up necessary since we never stop tracking anymore. track((domElement: any)); + initTextarea(domElement, props); postInitTextarea(domElement, props); return; } @@ -2260,13 +2260,13 @@ export function diffHydratedProperties( listenToNonDelegatedEvent('toggle', domElement); break; case 'input': - initInput(domElement, props); // We listen to this event in case to ensure emulated bubble // listeners still fire for the invalid event. listenToNonDelegatedEvent('invalid', domElement); // TODO: Make sure we check if this is still unmounted or do any clean // up necessary since we never stop tracking anymore. track((domElement: any)); + initInput(domElement, props); // For input and textarea we current always set the value property at // post mount to force it to diverge from attributes. However, for // option and select we don't quite do the same thing and select @@ -2278,19 +2278,19 @@ export function diffHydratedProperties( validateOptionProps(domElement, props); break; case 'select': - initSelect(domElement, props); // We listen to this event in case to ensure emulated bubble // listeners still fire for the invalid event. listenToNonDelegatedEvent('invalid', domElement); + initSelect(domElement, props); break; case 'textarea': - initTextarea(domElement, props); // We listen to this event in case to ensure emulated bubble // listeners still fire for the invalid event. listenToNonDelegatedEvent('invalid', domElement); // TODO: Make sure we check if this is still unmounted or do any clean // up necessary since we never stop tracking anymore. track((domElement: any)); + initTextarea(domElement, props); postInitTextarea(domElement, props); break; }