I noticed that tapping suggestions while typing on...
# webassembly
o
I noticed that tapping suggestions while typing on soft keyboard does not input the text in outlined text fields on google chrome browser, instead, it adds a single white space. It works fine on Firefox. I have only tried outlined text fields. These are some of the keyboard options i have tired:
Copy code
keyboardOptions: KeyboardOptions = KeyboardOptions(
    capitalization = KeyboardCapitalization.Unspecified,
    autoCorrectEnabled = true,
    keyboardType = KeyboardType.Text,
    imeAction = ImeAction.Done
)
Also, I had to modify the default OutlinedTextField since the content padding was too heavy:
Copy code
@Composable
fun EZOutlinedTextField(
    value: String,
    onValueChange: (String) -> Unit,
    modifier: Modifier = Modifier,
    enabled: Boolean = true,
    readOnly: Boolean = false,
    textStyle: TextStyle = LocalTextStyle.current,
    label: @Composable (() -> Unit)? = null,
    placeholder: @Composable (() -> Unit)? = null,
    leadingIcon: @Composable (() -> Unit)? = null,
    trailingIcon: @Composable (() -> Unit)? = null,
    isError: Boolean = false,
    visualTransformation: VisualTransformation = VisualTransformation.None,
    keyboardOptions: KeyboardOptions = KeyboardOptions(
        capitalization = KeyboardCapitalization.Unspecified,
        autoCorrectEnabled = true,
        keyboardType = KeyboardType.Text,
        imeAction = ImeAction.Done
    ),
    keyboardActions: KeyboardActions = KeyboardActions.Default,
    singleLine: Boolean = false,
    maxLines: Int = if (singleLine) 1 else Int.MAX_VALUE,
    minLines: Int = 1,
    interactionSource: MutableInteractionSource? = null,
    shape: Shape = TextFieldDefaults.OutlinedTextFieldShape,
    colors: TextFieldColors = TextFieldDefaults.outlinedTextFieldColors(),
    contentPaddingValues: PaddingValues = PaddingValues(top = 3.dp, start = 8.dp, end = 8.dp, bottom = 3.dp)
)
1
p
I'm waiting for 1.8.0-rc01 as there must be some fixes for textfield with software keyboard as stated in target version in https://youtrack.jetbrains.com/issue/CMP-6816
My suggestion is to check your issue after release of 1.8.0-rc01 and if it will still exists then create an issue in YT.
o
Thanks much, I will.
d
Just tested rc01 yesterday and I'm still encountering some issues with InputField, which kind of makes me wondering if such a "simple" element is presenting so "many" issues across platforms, what would be the case with much more complex things