jNayden
05/27/2024, 12:09 PMColumn {
val focusRequester = remember { FocusRequester() }
var value by remember { mutableStateOf("") }
TextField(modifier = Modifier.focusRequester(focusRequester), value = value, onValueChange = {
value = it
})
LaunchedEffect(Unit) {
focusRequester.requestFocus()
}
}
I want to make a specific TextField FOCUSED on load. This code will mark it as "FOCUSED" but its not really focused since you cannot type.. it looks the browser is keeping the focus not the page. If you just do TAB it will work but yeah.. maybe there is no way to take the browser focus but this is less then ideal for webpages.. when we open google.com we dont have to tab before search 😞Alex Styl
05/27/2024, 2:54 PMjNayden
05/27/2024, 2:56 PMAlex Styl
05/27/2024, 3:03 PMjNayden
05/27/2024, 3:04 PM