Storybook: Hash removed from url, causing anchor scrolling to break for on page load event

Created on 24 Jul 2020  路  2Comments  路  Source: storybookjs/storybook

Describe the bug
I believe this is possibly a regression.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://storybookjs.netlify.app/official-storybook/?path=/docs/addons-docs-markdown-docs--page#emphasis
  2. Note that you are scrolled down to the emphasis section
  3. Compare with the next build of storybook: https://next--storybookjs.netlify.app/official-storybook/?path=/story/addons-docs-markdown-docs--page#emphasis
  4. Note that you are _not_ scrolled down to the emphasis section. Furthermore, the hash in the URL has been removed.

Expected behavior
A user can visit a URL with an anchor that will scroll them to the related content, as shown in steps 1 and 2 above.

docs bug tracked

Most helpful comment

Good golly!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-rc.24 containing PR #11767 that references this issue. Upgrade today to try it out!

You can find this prerelease on the @next NPM tag.

Closing this issue. Please re-open if you think there's still more to do.

All 2 comments

Good golly!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-rc.24 containing PR #11767 that references this issue. Upgrade today to try it out!

You can find this prerelease on the @next NPM tag.

Closing this issue. Please re-open if you think there's still more to do.

I have another case, possibly related to this. Hash also removed from the iframe URL, when I use 芦Open canvas in new tab禄. Should I create a new issue, @shilman ?

Example: https://next--storybookjs.netlify.app/official-storybook/iframe.html?id=addons-docs-buttongroup--basic&viewMode=story#anchor

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tomitrescak picture tomitrescak  路  3Comments

ZigGreen picture ZigGreen  路  3Comments

rpersaud picture rpersaud  路  3Comments

alexanbj picture alexanbj  路  3Comments

purplecones picture purplecones  路  3Comments