Skip to content

fix: prevent tab anchor from overriding non-tab URL hashes#204

Merged
radoering merged 1 commit intopython-poetry:mainfrom
harshitbansal184507:fix/tabs-anchor-redirect
Apr 12, 2026
Merged

fix: prevent tab anchor from overriding non-tab URL hashes#204
radoering merged 1 commit intopython-poetry:mainfrom
harshitbansal184507:fix/tabs-anchor-redirect

Conversation

@harshitbansal184507
Copy link
Copy Markdown
Contributor

When visiting a URL with a non-tab anchor like /docs/cli/#add, the tabs controller
was replacing it with the first tab's ID (e.g. #script-project) because findIndex
returns -1 for no match, which defaults to index 0.

Added a guard so showTab() is only called when the anchor actually matches a tab ID.

@radoering radoering force-pushed the fix/tabs-anchor-redirect branch from 9a50c0a to ae83771 Compare April 12, 2026 16:12
@radoering radoering added the safe label Apr 12, 2026
@github-actions
Copy link
Copy Markdown

Deploy preview for website ready!

✅ Preview
https://website-7myfpdcri-python-poetry.vercel.app

Built with commit ae83771.
This pull request is being automatically deployed with vercel-action

Copy link
Copy Markdown
Member

@radoering radoering left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix.

@radoering radoering merged commit 35e979e into python-poetry:main Apr 12, 2026
3 checks passed
@radoering radoering removed the safe label Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants