Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

TextField does not unfocus when keyboard is hidden – Material 3 Jetpack Compose

I’m facing a problem and I’m not sure if I’m doing something wrong. When I implement a Material3 TextField when you hide the keyboard manually the Textfield is not loosing the focus and you can’t open the keyboard again.

Is someone facing the same issue?

I am not inserting code snippet because is the simple TextField of material3:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

        TextField(
            value = "",
            onValueChange = {}
        )

Here on this GIF you can see what it’s happening, you click on the TextField, it focus and opens the keyboard correctly, then you manually hide the keyboard, the TextField keeps on focus and does not let you to open again the keyboard.

I’m using the version "1.2.0-beta02" of material3 for Jetpack compose

gif of that it's happening

>Solution :

There was an issue in Jetpack Compose that was already fixed in the latest library version.
Make sure that you are using the latest Jetpack Compose dependencies as follows:

implementation "androidx.compose.ui:ui:1.6.0-rc01"
implementation "androidx.compose.material3:material3:1.2.0-beta02"

Please report back if this resolves your issue.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading