From 9bb042fe58c0e8140f05d8019ae009d733590fa3 Mon Sep 17 00:00:00 2001 From: Joshua Gross Date: Sun, 8 Dec 2019 18:21:22 -0800 Subject: [PATCH] TextInput: ViewManager shouldn't reset EditText padding when none is set Summary: UpdateLocalData and UpdateState return an `extra data` object, which in the case of TextInput contains padding. In Paper, the padding was always set on this object; in Fabric, it generally is not. However, the ViewManager was unconditionally setting the padding on the view, regardless of whether or not padding was set. We just check the padding values before setting now. This fixes an issue where the padding would be reset when the user started typing in Fabric. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D18875261 fbshipit-source-id: d7cb87c07f47ab522e32cd34a4ca6ed5fea2e832 --- .../textinput/ReactTextInputManager.java | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java index db6666bfabb..d614989a3e7 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java @@ -254,11 +254,21 @@ public class ReactTextInputManager extends BaseViewManager