Skip to content

Commit

Permalink
Merge pull request #14273 from 0xmiroslav/issue-13802
Browse files Browse the repository at this point in the history
fix long text cut in iOS single line input
  • Loading branch information
yuwenmemon authored Jan 13, 2023
2 parents f06b625 + 6090150 commit 3661b57
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 0 additions & 5 deletions src/components/RNTextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ const RNTextInput = props => (
}
props.forwardedRef(ref);
}}

// By default, align input to the left to override right alignment in RTL mode which is not yet supported in the App.
// eslint-disable-next-line react/jsx-props-no-multi-spaces
textAlign="left"

// eslint-disable-next-line
{...props}
/>
Expand Down
5 changes: 4 additions & 1 deletion src/components/TextInput/BaseTextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,10 @@ class BaseTextInput extends Component {
(!hasLabel || this.props.multiline) && styles.pv0,
this.props.prefixCharacter && StyleUtils.getPaddingLeft(this.state.prefixWidth + styles.pl1.paddingLeft),
this.props.secureTextEntry && styles.secureInput,
!this.props.multiline && {height: this.state.height},

// Explicitly remove `lineHeight` from single line inputs so that long text doesn't disappear
// once it exceeds the input space (See https://github.com/Expensify/App/issues/13802)
!this.props.multiline && {height: this.state.height, lineHeight: undefined},
]}
multiline={this.props.multiline}
maxLength={this.props.maxLength}
Expand Down

0 comments on commit 3661b57

Please sign in to comment.