-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix : hide keyboard when TextComposer is removed from composition #3985
Conversation
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3985 +/- ##
========================================
Coverage 83.10% 83.10%
========================================
Files 1806 1807 +1
Lines 45703 45710 +7
Branches 5383 5383
========================================
+ Hits 37980 37986 +6
Misses 5835 5835
- Partials 1888 1889 +1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
onDispose { | ||
keyboardController?.hide() | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe extract to a common module so it can be reused?
@Composable
fun HideKeyboardWhenDisposed() {
val keyboardController = LocalSoftwareKeyboardController.current
DisposableEffect(Unit) {
onDispose {
keyboardController?.hide()
}
}
}
69d24db
to
a475cb8
Compare
|
Content
Take over #3968
Make sure the keyboard is closed when TextComposer is removed from composition.
Motivation and context
Closes #3572
Screenshots / GIFs
Tests
Tested devices
Checklist