Skip to content

Commit 192b06d

Browse files
author
Clement DAL PALU
authored
Merge pull request #3510 from aliabbasmalik8/IS-3218-cursor-issue-edit-comment-box-android
[IS-3218] Fixed cursor issue
2 parents 103397d + 09b7e0a commit 192b06d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/pages/home/report/ReportActionItemMessageEdit.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ class ReportActionItemMessageEdit extends React.Component {
6262
* @param {String} newDraft
6363
*/
6464
updateDraft(newDraft) {
65+
this.textInput.setNativeProps({text: newDraft});
6566
const trimmedNewDraft = newDraft.trim();
6667
this.setState({draft: trimmedNewDraft});
6768
this.debouncedSaveDraft(trimmedNewDraft);
@@ -113,6 +114,7 @@ class ReportActionItemMessageEdit extends React.Component {
113114
<View style={[styles.chatItemComposeBox, styles.flexRow, styles.chatItemComposeBoxColor]}>
114115
<TextInputFocusable
115116
multiline
117+
ref={el => this.textInput = el}
116118
onChangeText={this.updateDraft} // Debounced saveDraftComment
117119
onKeyPress={this.triggerSaveOrCancel}
118120
defaultValue={this.props.draftMessage}

0 commit comments

Comments
 (0)