https://kotlinlang.org logo
#compose
Title
# compose
s

Steven Elliott

03/09/2023, 7:33 PM
When using the
androidx.compose.foundation.text.BasicTextField
that accepts a
string
over a
TextFieldValue
by default the component does not set the cursor selection to the end of the provided string. This is problematic when using the software keyboard to move focus to the next field using the IME Actions. The cursor position will then default to the start. I provided an example using the
OutlinedTextField
. I understand that I can switch to using the textFieldValue implementation but it just seems odd that the default behavior does not initialize the cursor selection to the end of the initially provided value. Is this really the intention, a bug, or am I missing something?
4 Views