Skip to content

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

Open
harshitbansal184507 wants to merge 1 commit intopython-poetry:mainfrom
harshitbansal184507:fix/tabs-anchor-redirect
Open

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

Conversation

@harshitbansal184507
Copy link
Copy Markdown

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.

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.

1 participant