Describe the bug
FocusRequester is not working on web both js(IR) and WASM . If you set FocusRequester to some input it gets the visual feedback that its focused but in fact its not, since the focus is I guess hold by the browser.
Affected platforms
Web (K/Wasm) - Canvas based API
Web (K/JS) - Canvas based API
Versions
Libraries:
Compose Multiplatform version: 1.6.10
Kotlin version: 2.0
To Reproduce
Run an app in wasm or js(ir) that is trying to set the focus on the first text field
Run this code snippet:
Column {
val focusRequester = remember { FocusRequester() }
var value by remember { mutableStateOf("") }
TextField(modifier = Modifier.focusRequester(focusRequester), value = value, onValueChange = {
value = it
})
LaunchedEffect(Unit) {
focusRequester.requestFocus()
}
}
Expected behavior
The focus should be set on this textfield and you can start typing rightaway. Like if you visit google.com or any website
Additional context
The visual indication is there but you cannot type. If however you hit TAB you will be able to write into the text field.
Describe the bug FocusRequester is not working on web both js(IR) and WASM . If you set FocusRequester to some input it gets the visual feedback that its focused but in fact its not, since the focus is I guess hold by the browser.
Affected platforms
Versions
To Reproduce Run an app in wasm or js(ir) that is trying to set the focus on the first text field
Run this code snippet:
Expected behavior The focus should be set on this textfield and you can start typing rightaway. Like if you visit google.com or any website
Additional context The visual indication is there but you cannot type. If however you hit TAB you will be able to write into the text field.