Skip to content

Commit 95a0d0b

Browse files
authored
Call setTextKeepState instead of setText and setSelection (#605)
1 parent 8596863 commit 95a0d0b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

android/src/main/java/com/expensify/livemarkdown/MarkdownTextInputDecoratorView.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,7 @@ protected void setParserId(int parserId) {
9393

9494
protected void applyNewStyles() {
9595
if (mReactEditText != null) {
96-
int selectionStart = mReactEditText.getSelectionStart();
97-
int selectionEnd = mReactEditText.getSelectionEnd();
98-
mReactEditText.setText(mReactEditText.getText()); // trigger update
99-
mReactEditText.setSelection(selectionStart, selectionEnd);
96+
mReactEditText.setTextKeepState(mReactEditText.getText()); // trigger update
10097
}
10198
}
10299
}

0 commit comments

Comments
 (0)