Android: clear the native focus when the keyboard hides

Otherwise the keyboard will popup again when the app is switched to the
background and back.

Fixes #5235
This commit is contained in:
Olivier Goffart 2024-06-03 16:27:47 +02:00
parent a1e7f85892
commit b3181b05a2

View file

@ -409,6 +409,7 @@ public class SlintAndroidJavaHelper {
public void run() {
InputMethodManager imm = (InputMethodManager) mActivity.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(mInputView.getWindowToken(), 0);
mInputView.clearFocus();
mInputView.setCursorPos(0, 0, 0, 0, 0, 0);
}
});