Clear focus when opening a bottom sheet
This commit is contained in:
parent
dbbe5fc2c7
commit
64ce07475c
@ -56,6 +56,7 @@ import androidx.compose.ui.input.nestedscroll.NestedScrollSource
|
|||||||
import androidx.compose.ui.input.nestedscroll.nestedScroll
|
import androidx.compose.ui.input.nestedscroll.nestedScroll
|
||||||
import androidx.compose.ui.input.pointer.pointerInput
|
import androidx.compose.ui.input.pointer.pointerInput
|
||||||
import androidx.compose.ui.layout.onSizeChanged
|
import androidx.compose.ui.layout.onSizeChanged
|
||||||
|
import androidx.compose.ui.platform.LocalFocusManager
|
||||||
import androidx.compose.ui.unit.Density
|
import androidx.compose.ui.unit.Density
|
||||||
import androidx.compose.ui.unit.IntOffset
|
import androidx.compose.ui.unit.IntOffset
|
||||||
import androidx.compose.ui.unit.IntRect
|
import androidx.compose.ui.unit.IntRect
|
||||||
@ -84,6 +85,11 @@ fun BottomSheetDialog(
|
|||||||
) {
|
) {
|
||||||
val scope = rememberCoroutineScope()
|
val scope = rememberCoroutineScope()
|
||||||
|
|
||||||
|
val focusManager = LocalFocusManager.current
|
||||||
|
LaunchedEffect(Unit) {
|
||||||
|
focusManager.clearFocus(true)
|
||||||
|
}
|
||||||
|
|
||||||
var isOpenAnimationFinished by remember { mutableStateOf(false) }
|
var isOpenAnimationFinished by remember { mutableStateOf(false) }
|
||||||
|
|
||||||
val draggableState = remember {
|
val draggableState = remember {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user