Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addon with-info wrap the story in a div with position: relative; #5707

Closed
yachaka opened this issue Feb 21, 2019 · 1 comment
Closed

Addon with-info wrap the story in a div with position: relative; #5707

yachaka opened this issue Feb 21, 2019 · 1 comment

Comments

@yachaka
Copy link

yachaka commented Feb 21, 2019

Describe the bug
See https://github.com/storybooks/storybook/blob/master/addons/info/src/components/Story.js#L49
Story is being wrapped in a position: relative; div.
Combined with the centering addon, it makes it so absolute element are not positioned relatively to the window but to the story itself.

To Reproduce

  1. Add addon-centered
  2. Add addon-info
  3. Create a story with a static fixed width element, and an absolute-positioned element
  4. Notice how the absolute-positioned element will be positioned relatively to the static fixed width element, and not the window

Expected behavior
Expected the absolute-positioned element to be positioned relatively to the window

Screenshots
capture d ecran 2019-02-21 a 16 13 30
^ This menu should be positioned relatively to the window because there is no wrapping relative div. It should stick to the left and right edges precisely.

Code snippets
If applicable, add code samples to help explain your problem.

System:

Additional context
Add any other context about the problem here.

@shilman
Copy link
Member

shilman commented Feb 21, 2019

Hey @yachaka, thanks for the bug report. Fortunately (unfortunately?) we are going to deprecate addon-info and move it to the addons panel #1147 as soon as v5 is out, so probably won't get around to this, but if anybody wants to submit a PR with the fix I'd probably release it in the meantime. Closing for now! 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants