diff --git a/app/src/main/java/com/geeksville/mesh/ui/message/Message.kt b/app/src/main/java/com/geeksville/mesh/ui/message/Message.kt index 1a5103e55..9470803fb 100644 --- a/app/src/main/java/com/geeksville/mesh/ui/message/Message.kt +++ b/app/src/main/java/com/geeksville/mesh/ui/message/Message.kt @@ -67,7 +67,7 @@ import androidx.compose.ui.focus.onFocusEvent import androidx.compose.ui.graphics.Color import androidx.compose.ui.platform.ComposeView import androidx.compose.ui.platform.LocalClipboardManager -import androidx.compose.ui.platform.LocalSoftwareKeyboardController +import androidx.compose.ui.platform.LocalFocusManager import androidx.compose.ui.platform.ViewCompositionStrategy import androidx.compose.ui.res.colorResource import androidx.compose.ui.res.pluralStringResource @@ -395,7 +395,7 @@ private fun TextInput( maxSize: Int = 200, onClick: (String) -> Unit = {} ) = Column(modifier) { - val keyboardController = LocalSoftwareKeyboardController.current + val focusManager = LocalFocusManager.current var isFocused by remember { mutableStateOf(false) } Row( @@ -426,7 +426,7 @@ private fun TextInput( if (message.value.text.isNotEmpty()) { onClick(message.value.text) message.value = TextFieldValue("") - keyboardController?.hide() + focusManager.clearFocus() } }, modifier = Modifier.size(48.dp),