Skip to content

A heading deep link puts the first Tab on a TOC row #309

Closed

Description

@HMarzban

Problem

On desktop, a pad opened from a heading deep link (?h=) puts the first Tab on a TOC row, not on "Skip to main content" (#248).

The cause is a heading scrollIntoView in the TipTap chunk. scrollIntoView also moves Chrome's sequential focus navigation starting point. The same bug in useHeadingScrollSpy.ts alignTocItem was fixed by scrolling the TOC container directly.

Fix

Find the heading scrollIntoView call that runs on a ?h= load. Scroll the editor's own scroll container instead, or restore the focus starting point after the scroll.

Check

Load a pad with ?h=<heading slug>&id=<heading id> on desktop. scrollDown in TipTap.tsx reads id, so ?h= alone does not scroll and does not show the bug. The first Tab lands on "Skip to main content", and the heading is still scrolled into view.

Part of #249.

Activity

  1. added
    bug
    on Sep 23, 2026
  2. added this to the v2.3.0 milestone on Oct 24, 2026
  3. HMarzban commented on Oct 25, 2026

    @HMarzban
    CollaboratorAuthor

    Built and committed on local main. Awaits the maintainer's final push.

    Remaining gate: the webapp deploy.

  4. HMarzban commented on Nov 3, 2026

    @HMarzban
    CollaboratorAuthor

    Shipped in dd8f13c3f, with a review follow-up in 5cfcc023d. A ?h= load now scrolls the editor's own scroller, not the heading's scrollIntoView. So the first Tab lands on "Skip to main content", and the heading still scrolls into view.

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

    DesktopUIbug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions