Skip to content

Commit 00a8efc

Browse files
committed
fix: always move the selection to the mention's trailing space
1 parent 6f28582 commit 00a8efc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

android/src/main/java/com/swmansion/enriched/textinput/styles/ParametrizedStyles.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,8 @@ class ParametrizedStyles(
405405
val hasSpaceAtTheEnd = spannable.length > safeEnd && spannable[safeEnd] == ' '
406406
if (!hasSpaceAtTheEnd) {
407407
spannable.insert(safeEnd, " ")
408+
} else {
409+
Selection.setSelection(spannable, safeEnd + 1)
408410
}
409411
}
410412

0 commit comments

Comments
 (0)