Skip to content

[Bug]: Android bottom navigation stays hidden after the keyboard closes without animating #40345

Closed as not planned

Description

@EhsanulHaqueSiam

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/mobile

Steps to reproduce

On an Android phone layout (standard bottom navigation or floating tabs):

  1. On the Chats tab, tap Search so the soft keyboard opens.
  2. With the keyboard still open, press Home.
  3. Open T3 Code again. The keyboard is gone.
  4. Close search.

On a Pixel 9 emulator (Android 16, Gboard) on main @ 7ef7ba0 this broke the navigation whenever reopening did not bring the keyboard back. If Gboard comes back to the focused search field, the bug does not trigger. Any keyboard close without an animation should do the same, for example a Share sheet or a permission dialog.

On a real phone the common trigger is a cold start from the Pixel Launcher app drawer while its search keyboard is up. Steps, recording and logs are in this comment.

Expected behavior

The bottom navigation (Chats / Pulls / Usage / Settings) comes back once the keyboard is gone.

Actual behavior

The navigation stays unmounted. Only the New thread button is left, sitting at the bottom inset. It stays that way until a keyboard opens and closes again normally, or the app restarts.

AndroidWorkspaceNavigation returns null while useSoftKeyboardShowing() is true, and that hook only listens to keyboardWillShow / keyboardWillHide. When the keyboard closes without an animation, react-native-keyboard-controller repairs the state in syncKeyboardPosition, which emits keyboardDidHide alone. The hook never sees it, so it keeps reporting the keyboard as shown.

#35488 reported the mirror case (a lone keyboardDidShow) and was closed because it could not be seen on a device. This direction is visible on a device.

Impact

Major degradation or frequent failure

Version or commit

Google Play build 2.3.0 (809) on the phone; main @ 7ef7ba0 on the emulator

Environment

Pixel 7 Pro, Android 17 (CP3A.261005.002.A1), Gboard 18.6.3, gesture navigation, One UI (floating) navigation style, store build 2.3.0 (809). Also reproduced on a Pixel 9 emulator (Android 16, Gboard 15.1) with a dev client, in both the floating and Material navigation styles.

Screenshots, recordings, or supporting files

Thread titles are blacked out.

1. Search open, keyboard up 2. After Home and back, search closed

With useSoftKeyboardShowing also following keyboardDidShow / keyboardDidHide, the same steps keep the navigation:

Open PR #36593 makes that change. Its author's follow-up there already traced the lone keyboardDidHide paths on an emulator; the steps here add the startup case on a real phone.

Workaround

Open and close the keyboard again (for example tap Search, then close it), or restart the app.

Activity

  1. juliusmarminge commented on Nov 21, 2026

    @juliusmarminge
    Member

    I tried to reproduce this on the current build and could not.

    Commit 9c25b71 (origin/main). Device: pooled Pixel 9 emulator (API 36, Gboard), T3 dev client from the shared cache, Metro from the checkout, no environment connected. Steps: on Chats, tapped Search, and Gboard opened. Then pressed Home and returned in four ways: reopening from the launcher, through the app switcher after 10 s, from the launcher after 60 s, and opening Android Settings over the app then pressing Back. Each time Gboard came back with the search field focused (agent-device keyboard status: visible), so the nonanimated hide never happened. I also tapped 'Add environment' with the keyboard up (keyboard hidden, navigation shown) and went back; the navigation stayed. So the on-screen symptom did not show on this emulator. The defect is shown in code: a new test in apps/mobile/src/features/keyboard/keyboardControllerState.test.tsx runs the real react-native-keyboard-controller JS with only the native event transport replaced. It renders useSoftKeyboardShowing and sends keyboardWillShow, keyboardDidShow, then a lone keyboardDidHide (what syncKeyboardPosition sends after a nonanimated IME close). On main it fails: KeyboardController.isVisible() is false but the hook still reports true. With the hook also listening to keyboardDidHide, all 3 tests in the file pass; that change was reverted and only the test was pushed.

    Closing as not planned. If it still happens for you, reply with the exact steps and the version you are on and it will be looked at again.

  2. EhsanulHaqueSiam commented on Nov 21, 2026

    @EhsanulHaqueSiam
    ContributorAuthor

    Update: the more common trigger is just opening the app.

    1. In another app, open the keyboard (for example a chat app, or Android Settings search).
    2. Switch to T3 Code.

    On a Pixel 9 emulator one switch logged keyboardDidShow, keyboardWillShow, keyboardDidShow, keyboardDidHide and no keyboardWillHide, so useSoftKeyboardShowing stays true and the navigation is gone with no keyboard on screen. Other switches send only keyboardDidShow, keyboardDidHide and the bar survives, which is why it looks random (1 of 5 switches on main). With PR #36593, 4 of 4 switches kept the navigation.

    Device evidence and test results are on #36593.

  3. EhsanulHaqueSiam commented on Nov 21, 2026

    @EhsanulHaqueSiam
    ContributorAuthor

    @juliusmarminge thanks for trying it. It reproduces on a real phone with the Play Store build, from a cold start, so could you reopen this?

    Versions

    • Phone: Pixel 7 Pro, Android 17 (CP3A.261005.002.A1, security patch 2026-10-05), gesture navigation, Gboard 18.6.3
    • App: T3 Code 2.3.0 (809) from Google Play (com.t3tools.t3code), One UI navigation style
    • Server: T3 Code Nightly 0.1.11-nightly.20261118.4864 on macOS, reached over T3 Connect. The bug is client-side, so this shouldn't matter.

    Steps (cold start)

    1. T3 Code is not running (force-stopped).
    2. On the Pixel Launcher, swipe up to the app drawer. Its search field takes focus and Gboard opens.
    3. Tap T3 Code in the drawer.

    T3 opens with no bottom navigation, only the compose button. It stays that way until a keyboard opens and closes inside T3 (tap Search, then close it).

    Runs on the phone (store build, driven over adb, no settings changed):

    Cold start Keyboard up when T3 opened Runs Navigation missing
    From the app drawer yes 2 2
    From the app drawer (the swipe didn't open the keyboard) no 9 0
    Normal launch no 3 0

    Every run with the launcher keyboard up lost the navigation, and every run without it kept it.

    Recording of a failing run. Thread titles and the app grid are blacked out; the keyboard is visible until T3 takes over.

    Full recording (MP4)

    Drawer with Gboard up → T3 splash while the keyboard is still there → T3 with no navigation:

    Phone log for that run (logcat -b main,system,events):

    20:37:08.491 am_proc_start [0,876,10468,com.t3tools.t3code,next-top-activity,{com.t3tools.t3code/com.t3tools.t3code.MainActivity}]
    20:37:08.685 wm_on_create_called [131232599,com.t3tools.t3code.MainActivity,performCreate,35]
    20:37:08.690 wm_on_resume_called [131232599,com.t3tools.t3code.MainActivity,RESUME_ACTIVITY,4]
    20:37:11.451 ImeTracker com.t3tools.t3code:382995e7: onRequestHide at ORIGIN_SERVER reason HIDE_UNSPECIFIED_WINDOW
    20:37:11.453 ImeTracker com.t3tools.t3code:382995e7: onCancelled at PHASE_CLIENT_ALREADY_HIDDEN
    20:37:11.459 ImeTracker com.google.android.apps.nexuslauncher:3e611325: onCancelled at PHASE_CLIENT_ANIMATION_CANCEL
    

    Why your attempt didn't hit it. In your runs Gboard came back to T3's own focused search field, so T3 never saw a keyboard close without an animation. Here the keyboard belongs to the launcher. T3 starts in a fresh process while that keyboard is on screen, and the launcher's hide animation is cancelled once T3 is on top. I added a temporary listener on all four keyboard events in a dev build on a Pixel 9 emulator (Android 16). Switching into T3 while another app's keyboard was up delivered keyboardDidShow, keyboardWillShow, keyboardDidShow, keyboardDidHide, with no keyboardWillHide. useSoftKeyboardShowing stays true and AndroidWorkspaceNavigation returns null. That is the lone-keyboardDidHide case your test covers.

    Fix. #36593 makes the hook follow the did-events too. With it applied to main on the emulator, the same switch kept the navigation in 4 of 4 runs, and the "search open, Home, back" path kept it in both navigation styles. I have not installed a build with the fix on the phone. Before/after captures are on #36593.

  4. EhsanulHaqueSiam commented on Nov 21, 2026

    @EhsanulHaqueSiam
    ContributorAuthor

    The one case #36593 doesn't cover (the activity recreated while the app is backgrounded with the keyboard up, e.g. a font size change) is fixed in #40380, with before/after there.

  5. EhsanulHaqueSiam commented on Nov 21, 2026

    @EhsanulHaqueSiam
    ContributorAuthor

    Every scenario I tested, so the coverage of #36593 and #40380 is in one place.

    # Scenario main #36593 #36593 + #40380
    1 Cold start from the Pixel Launcher app drawer while its search keyboard is up missing 2/2 (phone, store 2.3.0 (809)) not run on the phone; same event path as row 2 not run on the phone
    2 Switch into T3 while another app's keyboard is up missing 1/5, depends on event timing ok 4/4 (2 warm, 2 cold) not rerun
    3 Search open, Home, return without the keyboard, close search missing (Material and One UI styles) ok (both styles) not rerun
    4 Keyboard app switched while the keyboard is up missing 2/2 ok 2/2 ok 1/1
    5 Search open, Home, system font size changed, return (activity recreated) missing 2/2 missing 2/2 ok 2/2
    6 Filter sheet (React Native Modal) opened while the search keyboard is up ok 2/2 ok 2/2 ok 1/1
    7 Rotate with the keyboard up ok 2/2 ok 2/2 ok 1/1
    8 Android share sheet from a PR's long-press menu while the PR search keyboard is up ok 1/1 not run ok 1/1
    9 Photo picker and file picker over the app while the composer keyboard is up ok 1/1 each not run ok 1/1 each
    10 Keyboard shown without an animation (focused field moved from a headless keyboard to Gboard) ok, nav hidden while typing not run ok
    11 Search opened and closed 5 times as fast as possible ok (final state) not run ok (final state)
    12 Plain cold start, no keyboard anywhere ok (6 emulator, 12 phone) not run not rerun

    Rows 2 to 12 ran on a Pixel 9 emulator (Android 16, Gboard 15.1) with a dev client from main @ 7ef7ba0, and #36593 and #40380 cherry-picked as named. Row 1 ran on a Pixel 7 Pro (Android 17, Gboard 18.6.3) with the Play Store build. "Missing" means the bottom navigation was gone with no keyboard on screen and only the compose button left.

    How the broken rows happen: rows 1 to 4 end with a lone keyboardDidHide (no keyboardWillHide), which main ignores and #36593 handles. In row 8 the share sheet also sends a lone keyboardDidHide, but the keyboard comes straight back to the focused field, which resets the flag. In row 5 nothing is sent at all, because the recreated activity's KeyboardAnimationCallback starts from the current height. #40380 makes it sync once.

    Not tested: the command palette and connecting a hardware keyboard. Both need a hardware keyboard, which this emulator doesn't have. A one-frame flicker in row 11 would not show in the snapshots used.

  6. haffi96 commented on Nov 22, 2026

    @haffi96

    +1 on this issue. I'm running on Pixel 8 and see the same cases with missing bottom nav. I've not tested all cases listed above but initially noticed on initial app load. It's been this way for a while now, finally come to create an issue and found this one

  7. DrakeRamorayJr commented on Nov 22, 2026

    @DrakeRamorayJr

    I'm also seeing this on a Pixel 10 Pro, Android 17, T3 Code 2.3.0 from Play Store, with the One UI (floating) navigation style.

    The floating bar is inconsistent: sometimes it shows, sometimes it disappears completely. I haven't tied it to one action I noticed. It may be a cold start, or a keyboard close that didn't animate, as described here and in #36593.

    When it's gone, only the New thread button is left at the bottom. Opening and closing the keyboard, or restarting the app, brings the bar back.

    #36593 looks like the right fix. Happy to test a build on this phone if that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions