3

A weird bug in my current app that was created using Jetpack Compose.

Issue: Once the soft keyboard is opened in the app, due to any screen with TextField, the keyboard is shown every time when switching from a different app to this one.

Video

Unable to provide a minimal reproducible code as I can't figure out which code is causing this issue and I noticed this quite late as I didn't expect a bug when switching apps.

The whole source code is on Github: https://github.com/Abhimanyu14/finance-manager/tree/main/codebase/android.

Kindly comment if any particular code might help.


Adding keyboard-related code I can think of which might have an impact.

The keyboard is hidden whenever composable navigation happens,

Using LocalSoftwareKeyboardController,

val keyboardController = LocalSoftwareKeyboardController.current
keyboardController?.hide()
Abhimanyu
  • 11,351
  • 7
  • 51
  • 121

1 Answers1

2

This was a bug in compose (https://issuetracker.google.com/issues/225541817). It's fixed as of compose 1.2.0-beta02

Bob bobbington
  • 1,225
  • 13
  • 12