Skip to content

[Bug / UX] Document pane does not receive keyboard focus on load (cannot scroll with arrow keys/PageDown without clicking first) #1647

Description

@henriquegeremia

Environment

  • Plannotator Version: 0.27.22 (or latest)
  • OS: Windows 11
  • Browser: Google Chrome

Description

When a review session opens in the browser, the main text/markdown content container is not focused by default. Pressing keyboard navigation keys (Down, Up, Page Down, Space) does nothing until the user manually clicks inside the document reader area.

This breaks keyboard-first workflows and requires an unnecessary mouse interaction every time a plan review starts.

Steps to Reproduce

  1. Trigger an annotation/review session (plannotator annotate <file> or agent hook).
  2. The browser opens the review tab (e.g. http://localhost:59902).
  3. Without clicking anything on screen, immediately press Down Arrow, Page Down, or Space.
  4. Observed: Nothing scrolls.
  5. Click inside the central document pane and press the same keys.
  6. Observed: The document now scrolls as expected.

Expected Behavior

Either the main scrollable document container should automatically receive focus on mount (e.g., ref.current?.focus() or tabIndex={0} on the scrollable container), or global scroll keys should delegate scroll events to the active document viewport so keyboard reading works immediately upon launch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions