mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 03:07:25 +01:00
Fix missing focus when single TextField shown (#8098)
This commit is contained in:
parent
e2ce3f68bf
commit
f19c288bec
@ -70,7 +70,7 @@ fun CategoryRenameDialog(
|
||||
category: Category,
|
||||
) {
|
||||
val (name, onNameChange) = remember { mutableStateOf(category.name) }
|
||||
val focusRequester = remember { FocusRequester.Default }
|
||||
val focusRequester = remember { FocusRequester() }
|
||||
|
||||
AlertDialog(
|
||||
onDismissRequest = onDismissRequest,
|
||||
|
@ -41,7 +41,6 @@ import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
import eu.kanade.tachiyomi.R
|
||||
import kotlinx.coroutines.delay
|
||||
|
||||
@Composable
|
||||
fun AppBar(
|
||||
@ -225,7 +224,7 @@ fun SearchToolbar(
|
||||
downloadedOnlyMode: Boolean = false,
|
||||
scrollBehavior: TopAppBarScrollBehavior? = null,
|
||||
) {
|
||||
val focusRequester = remember { FocusRequester.Default }
|
||||
val focusRequester = remember { FocusRequester() }
|
||||
AppBar(
|
||||
titleContent = {
|
||||
BasicTextField(
|
||||
@ -256,8 +255,6 @@ fun SearchToolbar(
|
||||
scrollBehavior = scrollBehavior,
|
||||
)
|
||||
LaunchedEffect(focusRequester) {
|
||||
// TODO: https://issuetracker.google.com/issues/204502668
|
||||
delay(100)
|
||||
focusRequester.requestFocus()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user