Fixed
Status Update
Comments
au...@google.com <au...@google.com> #2
klippenstein@ PTAL
kl...@google.com <kl...@google.com>
kl...@google.com <kl...@google.com> #3
It seems to me like we should probably hide the keyboard when the focused field is disabled.
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit 9ded53b9984f97e04679027e2e93760441079d0c
Author: Zach Klippenstein <klippenstein@google.com>
Date: Wed Jul 13 17:14:19 2022
Hide keyboard when focused text field is disabled.
Fixes: b/237308379
Test: ./gradlew :compose:f:f:cDAT
Relnote: "Soft keyboard will now be hidden when a text field is disabled
while focused."
Change-Id: I6e3e4c264a0927710ee2413740154ddb6ac392bf
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/CoreTextFieldInputServiceIntegrationTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/CoreTextField.kt
https://android-review.googlesource.com/2153239
Branch: androidx-main
commit 9ded53b9984f97e04679027e2e93760441079d0c
Author: Zach Klippenstein <klippenstein@google.com>
Date: Wed Jul 13 17:14:19 2022
Hide keyboard when focused text field is disabled.
Fixes:
Test: ./gradlew :compose:f:f:cDAT
Relnote: "Soft keyboard will now be hidden when a text field is disabled
while focused."
Change-Id: I6e3e4c264a0927710ee2413740154ddb6ac392bf
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/CoreTextFieldInputServiceIntegrationTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/CoreTextField.kt
Description
Jetpack Compose version: 1.2.0-rc02 Jetpack Compose component used: ui, material Kotlin version: 1.6.21
Steps to Reproduce or Code Sample to Reproduce:
Create empty compose project. Add below code to MainActivity:
When TextField is enabled, everything works as expected. Removing it from composition makes the soft keyboard disappear. But once
enabled
is set to false, TextField loses focus but keyboard remains visible, even when later TextField is removed from the composition.Expected behavior:
Actual behavior: