Skip to content

Commit

Permalink
Merge pull request #3510 from aliabbasmalik8/IS-3218-cursor-issue-edi…
Browse files Browse the repository at this point in the history
…t-comment-box-android

[IS-3218] Fixed cursor issue
  • Loading branch information
Clement DAL PALU authored Jun 10, 2021
2 parents 103397d + 09b7e0a commit 192b06d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pages/home/report/ReportActionItemMessageEdit.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class ReportActionItemMessageEdit extends React.Component {
* @param {String} newDraft
*/
updateDraft(newDraft) {
this.textInput.setNativeProps({text: newDraft});
const trimmedNewDraft = newDraft.trim();
this.setState({draft: trimmedNewDraft});
this.debouncedSaveDraft(trimmedNewDraft);
Expand Down Expand Up @@ -113,6 +114,7 @@ class ReportActionItemMessageEdit extends React.Component {
<View style={[styles.chatItemComposeBox, styles.flexRow, styles.chatItemComposeBoxColor]}>
<TextInputFocusable
multiline
ref={el => this.textInput = el}
onChangeText={this.updateDraft} // Debounced saveDraftComment
onKeyPress={this.triggerSaveOrCancel}
defaultValue={this.props.draftMessage}
Expand Down

0 comments on commit 192b06d

Please sign in to comment.