Skip to content

Commit 09b1bcb

Browse files
fix(mobile): Android composer blur no longer hides another field's keyboard
Tapping a text field in the thread feed blurred the composer, and the Android editor hid the window's soft input unconditionally, closing the keyboard the tapped field had just opened. Leave the keyboard alone when another text field in the window holds focus. Fixes #33965 AI-assisted; verified with the tests and tools listed above.
1 parent 8ee7183 commit 09b1bcb

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎apps/mobile/modules/t3-composer-editor/android/src/main/java/expo/modules/t3composereditor/T3ComposerEditorView.kt‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,9 @@ class T3ComposerEditorView(context: Context, appContext: AppContext) : ExpoView(
374374
}
375375

376376
fun blurEditor() {
377+
// The IME belongs to the window: leave it alone when another text field holds focus.
378+
val focused = editor.rootView.findFocus()
379+
if (focused != null && focused !== editor && focused.onCheckIsTextEditor()) return
377380
editor.clearFocus()
378381
val imm = context.getSystemService(Context.INPUT_METHOD_SERVICE) as? InputMethodManager
379382
imm?.hideSoftInputFromWindow(editor.windowToken, 0)

0 commit comments

Comments
 (0)