Skip to content

Commit

Permalink
[IS-3218] Fixed cursor issue
Browse files Browse the repository at this point in the history
  • Loading branch information
aliabbasmalik8 committed Jun 10, 2021
1 parent c185800 commit 09b7e0a
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 09b7e0a

Please sign in to comment.