I am developing an Android (Jetpack Compose) app and have observed that when a textfield gains focus, a software (IME) keyboard opens, and remains open even after I click outside the field.
This is the default behavior from the programming side and there don't appear to be Android APIs that do something similar in another way.
My intuition is that such behavior is wrong and instead the following behavior should happen: if the user clicks outside the TextField, then the TextField should lose the focus (there may be no focused component) and the software keyboard should be hidden. Of course, if the user clicks outside the original TextField but inside another TextField, then it is different - new TextField should acquire focus and should keep the IME keyboard open.
Isn't that more intuitive for the user? Or should the keyboard remain open until the user dismisses it, or something else happens?