If hide the bottom sheet by drag gesture then keyboard won't hide automatically
How can I fix it?
Since you haven't shared any code here, this is how I would have handle this issue:
Use the Disposable Effect and onDispose handle the keyboard hiding
Sample Code:
... val keyboardController = LocalSoftwareKeyboardController.current DisposableEffect(key1 = modalBottomSheetState.isVisible, effect = { onDispose { keyboardController?.hide() } }) ...
The LocalSoftwareKeyboardController is marked as Experimental so you can also do the following:
... val focusManager = LocalFocusManager.current DisposableEffect(key1 = modalBottomSheetState.isVisible, effect = { onDispose { focusManager.clearFocus() } }) ...
Copyright © 2021 Jogjafile Inc.
Since you haven't shared any code here, this is how I would have handle this issue:
Use the Disposable Effect and onDispose handle the keyboard hiding
Sample Code:
The LocalSoftwareKeyboardController is marked as Experimental so you can also do the following: