Skip to content

Open collapses and tabs from URL hash links - #42835

Open
mdo wants to merge 1 commit into
v6-devfrom
js/hash-deep-links
Open

Open collapses and tabs from URL hash links#42835
mdo wants to merge 1 commit into
v6-devfrom
js/hash-deep-links

Conversation

@mdo

@mdo mdo commented Aug 12, 2026

Copy link
Copy Markdown
Member
  • Add opt-in data-bs-hash on collapse and tab pane targets so #fragment links can open them
  • On load and hashchange, scroll the trigger first, show the panel, then scroll the target into view
  • Document with Hash links examples, and include [data-bs-hash] in docs scroll-margin rules

Fixes #34299

Visiting a page with a fragment left opted-in collapses and tabs
closed, so deep links could not reveal their content.

Add `data-bs-hash` on the target. On load and hashchange, scroll
the trigger, show the panel, then scroll the target into view.

Fixes #34299
@mdo
mdo requested review from a team as code owners August 12, 2026 19:15
@mdo mdo added this to v6.0.0 Aug 12, 2026
@github-project-automation github-project-automation Bot moved this to Inbox in v6.0.0 Aug 12, 2026
@mdo mdo removed this from v6.0.0 Aug 12, 2026
@mdo mdo added v6-revisit and removed v6 labels Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant