Skip to content

Closing the right panel with Ctrl+J drops keyboard focus to <body>, and reopening does not restore it #8235

In progress

Description

@wataruY

Summary

When keyboard focus is inside the thread's right panel and you press Ctrl+J to close it, focus falls to <body>. Pressing Ctrl+J again reopens the panel but focus stays on <body>, so a keyboard user has to Tab back in from the top. Expected: closing returns focus to where it was before the panel opened (or the composer), and opening moves focus into the panel.

Versions and environment

  • bb desktop 0.50.1 (latest release), Linux (CachyOS, kernel 7.3.5)
  • Code cited below is unchanged on main at b0ddaad731565d7e4de68d824120d802fc78f7d5
  • No provider involved; built-in panel tabs only

Steps to reproduce

  1. Open any thread. Open the right panel (Ctrl+J) so the Thread info tab is showing.
  2. Focus the "Show thread info panel" tab button in the panel (Tab to it, or click it).
  3. Press Ctrl+J. The panel closes.
  4. In DevTools, check document.activeElement.
  5. Press Ctrl+J again. The panel opens. Check document.activeElement again.

Expected vs actual

1 panel open,   activeElement: BUTTON[aria-label="Show thread info panel"]
2 Ctrl+J -> closed, activeElement: BODY
3 Ctrl+J -> open,   activeElement: BODY

Expected after step 3: focus returns to the element that had it before the panel was opened (here, the composer or the thread view), not <body>. Expected after step 5: focus moves into the panel (for example the active tab button), or back to the control that had focus when the panel closed.

Evidence

What you ruled out

  • Not plugin-caused: reproduced with only bb's built-in Thread info tab focused.
  • Not Focus is not returned to the composer after the rename dialog closes #3217 (focus not returned to the composer after the rename dialog closes): different surface, and that one is closed.
  • Searched open and closed issues for focus, Ctrl+J, panel toggle, inert and secondary panel: no match.
  • A plugin tab cannot fix this on its own: it does not know which element had focus before the panel opened. (A plugin can refocus its own content when its tab becomes visible, which only covers reopening.)

Suggested priority and effort

Low to medium: affects keyboard-only users on every panel toggle, workaround is Tab or clicking. Effort: low (remember the focused element on open, restore it on close, focus the active tab on open).

Checks

  • I reproduced this on the latest release (0.50.1); the cited code is unchanged on main at b0ddaad731565d7e4de68d824120d802fc78f7d5.
  • I searched open and closed issues for the same problem.
  • If an agent wrote this, the body ends with > AGENT GENERATED and links the thread or report.

Found during keyboard accessibility testing of a bb plugin side panel (local bb thread, not public).

AGENT GENERATED

Activity

  1. added theissue type on Nov 26, 2026
  2. added
    ui
    confirmed-repro
    on Nov 26, 2026
  3. bb-slop-cop commented on Nov 26, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification: Bug · Priority Medium · Effort Low · ui.
    • Verdict: REPRODUCED, high root-cause confidence; applied confirmed-repro.
    • Root cause: The shared panel becomes inert without restoring outside focus; reopening has no focus handoff.
    • Report: https://get-bb.github.io/reports/issues/8235.html — reproduced from two clean trusted-main checkouts, with real Chromium evidence.
    • Ready fix: Restore secondary-panel focus across visibility changes #8239 — 73 changed text lines across two existing files; not merged.
    • Verification: The focused lifecycle regression fails on unchanged main and passes after the fix. All 523 relevant tests pass (2 skipped); lint/typecheck pass. Chromium confirms focus returns to the previous textbox on close and enters the panel on reopen. Packaged desktop and Safari/iOS were not tested.

    AGENT GENERATED

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

    confirmed-reproui

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions