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> on desktop. The first Tab lands on "Skip to main content", and the heading is still scrolled into view.
Part of #249.
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
scrollIntoViewin the TipTap chunk.scrollIntoViewalso moves Chrome's sequential focus navigation starting point. The same bug inuseHeadingScrollSpy.tsalignTocItemwas fixed by scrolling the TOC container directly.Fix
Find the heading
scrollIntoViewcall 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>on desktop. The first Tab lands on "Skip to main content", and the heading is still scrolled into view.Part of #249.