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

Sidebar shifts to right when a Bootstrap modal is opened #19

Closed
dlong500 opened this issue May 1, 2015 · 1 comment · Fixed by #23
Closed

Sidebar shifts to right when a Bootstrap modal is opened #19

dlong500 opened this issue May 1, 2015 · 1 comment · Fixed by #23
Assignees
Labels

Comments

@dlong500
Copy link

dlong500 commented May 1, 2015

This isn't a huge deal, but it would be nice to be able to avoid having the sidebar shift to the right when a Bootstrap modal is invoked. Bootstrap removes the scrollbar of the main viewport when a modal is opened, and thus the sidebar gets shifted to the right. It's not a functional issue, but aesthetically it is distracting.

Given all the magic Bootstrap uses behind the scenes there is no simple CSS fix to prevent the issue without causing other problems. Is there anything that could be added to allow the sidebar to detect removal of a scrollbar and compensate for that?

@IonicaBizau
Copy link
Collaborator

If I understood correctly, it's the same issue like when we have a dynamic width sidebar which is closed and the window is resized. Then a little part of the sidebar is shown.

I'm not sure but, we may fix the both issues using $(window).on("resize", doTheMagic).
Would you like to fix this?

@IonicaBizau IonicaBizau added the bug label May 1, 2015
@IonicaBizau IonicaBizau self-assigned this Jul 20, 2015
IonicaBizau added a commit that referenced this issue Jul 20, 2015
This fixes #19. When the window is resized, if the sidebar is in the closed state, we trigger the sidebar:close event, so the sidebar will be closed.
In previous versions, if the sidebar was having percentage sizes (height or/and width) it would appear on the window margin when the window would get resized.

Also, we now store the settings object reference in the `sidebar` data (jQuery).

This commit also fixes #22. 🔥
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants