Skip to content
quarry Check-in [c2775268a4]
Login

Check-in [c2775268a4]

Overview
Comment:Doc tabs: keep the URL on the tab you are reading

Switching README to LICENSE swapped the panel and left the address bar behind, so the tab on screen was unlinkable and a reload dropped you back on README — even though /r/REPO?doc=LICENSE has always been a real route, and the anchor was already carrying it as its href.

Moves the tabs onto syncurl, which corrects the address bar to that same href before fetching the fragment.

Timelines: family | ancestors | descendants | both | url-sync-doctabs
Files: files | file ages | folders
SHA3-256: c2775268a4e2c1cd683a652173ca4968ca70c3388ae6355aaed758bc914f1ced
User & Date: dmestas on 2026-08-27 10:54:06.373
Other Links: branch diff | manifest | tags
Context
2026-08-27
11:42
Merge trunk

Current with the segment below, now landed. closed check-in: a50a6dee00 user: dmestas tags: url-sync-doctabs

10:54
Doc tabs: keep the URL on the tab you are reading

Switching README to LICENSE swapped the panel and left the address bar behind, so the tab on screen was unlinkable and a reload dropped you back on README — even though /r/REPO?doc=LICENSE has always been a real route, and the anchor was already carrying it as its href.

Moves the tabs onto syncurl, which corrects the address bar to that same href before fetching the fragment. check-in: c2775268a4 user: dmestas tags: url-sync-doctabs

10:52
One definition of swap-the-body-and-fix-the-URL

The diff toggle carried the replaceState handler as literal text in two attributes, with the reasoning in a comment above them. Both move onto a syncurl helper, so the next surface that needs it gets the try/catch and the replaceState-not-pushState choice for free instead of by copy-paste. Emitted markup is unchanged.

The helper neutralizes quotes in the fragment URL: it lands inside a JS string inside an attribute built as HTMLAttr, where escaping is off. check-in: 058a2216c9 user: dmestas tags: url-sync-helper

Changes