Skip to content

Markdown preview loses scroll position after switching tabs #22300

Open

Description

@andreivasilca

When I switch away from a rendered markdown file in the file preview panel and come back, the preview jumps to the top. It should come back where I left it, the way the code view does when it restores its view state.

Steps:

  1. Open a long .md file in the right-hand file preview panel, rendered view.
  2. Scroll down.
  3. Switch to another tab, then back to the file.

Expected: the preview is where I left it.
Actual: the preview is back at the top, so on a long document I have to find my place again after every tab switch.

There is no setting for this. Remembering the position per file would be enough.

Version: T3 Code Nightly 0.1.1-nightly.20261019.3360, macOS.

Activity

  1. juliusmarminge commented on Oct 22, 2026

    @juliusmarminge
    Member

    Reproduced in the web dev app on Linux at ed9b7ca9c5: opened AGENTS.md in the right-hand file panel, enabled rendered Markdown, scrolled 1,800 px, switched to README.md, then returned to AGENTS.md. The preview returned to 0 px. Recording. Native macOS/Electron has not been checked.

  2. juliusmarminge commented on Oct 22, 2026

    @juliusmarminge
    Member

    Reproduced in the web development app on 96bae5465b: scroll rendered Markdown to 1,800 px, switch file tabs, then return; the preview resets to 0. The fix restores 1,800 px. The real-layout browser regression fails before and passes after; 14 focused tests pass.

    Fix: #23503.

    Before recording · After recording · Evidence and verification gaps.

    Native Electron could not be checked on this Linux VM; the shared web panel was verified at wide and narrow widths in light and dark themes.

  3. alcosml commented on Nov 6, 2026

    @alcosml

    Also reproduces on Windows 11 (desktop app, T3 Code Nightly 0.1.8-nightly.20261106.4247), and the trigger isn't limited to switching between file tabs:

    1. Open a long .md file in the right panel (rendered) next to a side chat tab.
    2. Scroll down in the .md tab and copy some text.
    3. Switch to the side chat tab, then back to the .md tab.

    The preview is back at the top. The right panel renders only the active surface (ChatView.tsx passes the active surface to RightPanelSurfaceContent), so any tab switch unmounts the preview. Any fix should cover switches to non-file tabs (side chat, terminal, etc.) as well.

    This makes a common workflow tedious: read a plan, copy a passage, quote it in a side chat, go back for the next passage, and find your place again every time.

    Reported through t3 triage; comment drafted by Claude Opus 5.5 (claude-opus-5-5) in Claude Code.

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