@@ -49,7 +49,6 @@ function BaseTextInput(
49
49
autoFocus = false ,
50
50
disableKeyboard = false ,
51
51
autoGrow = false ,
52
- autoGrowExtraSpace = 0 ,
53
52
autoGrowHeight = false ,
54
53
maxAutoGrowHeight,
55
54
hideFocusedState = false ,
@@ -251,8 +250,7 @@ function BaseTextInput(
251
250
const newTextInputContainerStyles : StyleProp < ViewStyle > = StyleSheet . flatten ( [
252
251
styles . textInputContainer ,
253
252
textInputContainerStyles ,
254
- ! ! contentWidth && StyleUtils . getWidthStyle ( textInputWidth ) ,
255
- autoGrow && StyleUtils . getAutoGrowWidthInputContainerStyles ( textInputWidth , autoGrowExtraSpace ) ,
253
+ ( autoGrow || ! ! contentWidth ) && StyleUtils . getWidthStyle ( textInputWidth ) ,
256
254
! hideFocusedState && isFocused && styles . borderColorFocus ,
257
255
( ! ! hasError || ! ! errorText ) && styles . borderColorDanger ,
258
256
autoGrowHeight && { scrollPaddingTop : typeof maxAutoGrowHeight === 'number' ? 2 * maxAutoGrowHeight : undefined } ,
@@ -443,10 +441,14 @@ function BaseTextInput(
443
441
) }
444
442
{ /*
445
443
Text input component doesn't support auto grow by default.
444
+ We're using a hidden text input to achieve that.
446
445
This text view is used to calculate width or height of the input value given textStyle in this component.
447
446
This Text component is intentionally positioned out of the screen.
448
447
*/ }
449
448
{ ( ! ! autoGrow || autoGrowHeight ) && ! isAutoGrowHeightMarkdown && (
449
+ // Add +2 to width on Safari browsers so that text is not cut off due to the cursor or when changing the value
450
+ // https://github.com/Expensify/App/issues/8158
451
+ // https://github.com/Expensify/App/issues/26628
450
452
< Text
451
453
style = { [
452
454
inputStyle ,
0 commit comments