diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputShadowNode.java b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputShadowNode.java index 2fb427ee8..1336314cd 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputShadowNode.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputShadowNode.java @@ -15,6 +15,7 @@ import com.facebook.infer.annotation.Assertions; import com.facebook.react.bridge.JSApplicationIllegalArgumentException; import com.facebook.react.common.annotations.VisibleForTesting; import com.facebook.react.uimanager.LayoutShadowNode; +import com.facebook.react.uimanager.ReactShadowNodeImpl; import com.facebook.react.uimanager.Spacing; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.UIViewOperationQueue; @@ -53,11 +54,6 @@ public class ReactTextInputShadowNode extends ReactBaseTextShadowNode mMostRecentEventCount = node.mMostRecentEventCount; mText = node.mText; mLocalData = node.mLocalData; - setMeasureFunction(this); - ThemedReactContext themedContext = getThemedContext(); - if (themedContext != null) { - setThemedContext(themedContext); - } } @Override @@ -65,6 +61,28 @@ public class ReactTextInputShadowNode extends ReactBaseTextShadowNode return new ReactTextInputShadowNode(this); } + @Override + public ReactTextInputShadowNode mutableCopy() { + ReactTextInputShadowNode node = (ReactTextInputShadowNode) super.mutableCopy(); + node.setMeasureFunction(this); + ThemedReactContext themedContext = getThemedContext(); + if (themedContext != null) { + node.setThemedContext(themedContext); + } + return node; + } + + @Override + public ReactTextInputShadowNode mutableCopyWithNewChildren() { + ReactTextInputShadowNode node = (ReactTextInputShadowNode) super.mutableCopyWithNewChildren(); + node.setMeasureFunction(this); + ThemedReactContext themedContext = getThemedContext(); + if (themedContext != null) { + node.setThemedContext(themedContext); + } + return node; + } + @Override public void setThemedContext(ThemedReactContext themedContext) { super.setThemedContext(themedContext);