You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Because switching to the Docs tab from the Canvas tab merely hides the Canvas, rather than removing it from the document, the default Docs are likely to result in elements being duplicated between the Canvas and the Docs tab, including having multiple elements with the same HTML ID.
Notice that the svg and clip-path elements are repeated with the same ID.
Furthermore, because the firstclip-path in the document is contained in a display: none element, the clip-path becomes essentially non-functional. As such, the SVG is rendered correctly as a circle on the Canvas tab, but incorrectly as a square on the Docs tab.
We’re cleaning house! Storybook has changed a lot since this issue was created and we don’t know if it’s still valid. Please open a new issue referencing this one if:
Describe the bug
Because switching to the Docs tab from the Canvas tab merely hides the Canvas, rather than removing it from the document, the default Docs are likely to result in elements being duplicated between the Canvas and the Docs tab, including having multiple elements with the same HTML ID.
For example, the result of this repro case is:
Click to expand
Notice that the
svg
andclip-path
elements are repeated with the same ID.Furthermore, because the first
clip-path
in the document is contained in adisplay: none
element, theclip-path
becomes essentially non-functional. As such, the SVG is rendered correctly as a circle on the Canvas tab, but incorrectly as a square on the Docs tab.To Reproduce
Source code · Live Storybook
yarn storybook
.Circle
Story.Expected result: It also renders as a blue circle on the Docs tab.
Actual result: It renders as a blue square on the Docs tab.
Reproduced on Firefox and Chrome on macOS (latest versions). Not reproduced on Safari on macOS.
System
Additional context
N/A
The text was updated successfully, but these errors were encountered: