https://kotlinlang.org logo
#compose
Title
# compose
v

vide

09/21/2023, 4:42 PM
I'm seeing some weird behaviour on 1.6.0-alpha06 with the soft keyboard: calling
LocalSoftwareKeyboardController.current?.show()
seems to now open the soft keyboard regardless of if there's a focused text field. This seems to differ from 1.3.X behaviour, is the change intentional or documented somewhere?
z

Zach Klippenstein (he/him) [MOD]

09/21/2023, 5:56 PM
please file a bug
v

vide

09/21/2023, 7:57 PM
I couldn't reproduce this with a trivial example, there's probably some other condition needed for it to happen. I'll see if I can narrow it down a bit. The keyboard acts like a hardware keyboard when opened
z

Zach Klippenstein (he/him) [MOD]

09/21/2023, 7:58 PM
Did you have unfocused text fields on the screen? Material text fields or something else?
v

vide

09/21/2023, 8:06 PM
Hmm. There shouldn't be on that specific page, but the keyboard is opened & closed before the bug occurs. I tried removing the preceding text field, and it no longer occurs. Might it be that the previous session is not properly closed?
Untitled.kt
Good insight! Managed to create a repro, the flow is maybe a bit complicated here... The text field captures focus first, and then you can close the keyboard and press the right square to move focus to the left square and then attempt to toggle the keyboard:
Screen_recording_20230921_131840.webm
z

Zach Klippenstein (he/him) [MOD]

09/21/2023, 11:53 PM
thanks!