the background move a little when opening a modal.
when I click button to show a "modal", the background move a little then move back, which is not happened in bootstrap and uikit modal.
https://github.com/angular-ui/bootstrap/blob/master/CONTRIBUTING.md#you-think-youve-found-a-bug
You can reproduce it open the following link in Chrome. http://angular-ui.github.io/bootstrap/ modal part press any of the 3 buttons, when the modal is showing, notice the background content (not the modal) move to right a little bit. In the uikit demo http://getuikit.com/docs/modal.html the modal opens smoothly, the background without any move.
For more information about the issue: https://github.com/twbs/bootstrap/issues/9855
It seems that someone has already ported the fix, but hasn't made a pull request https://github.com/MrOrz/bootstrap/commit/1a4729a6ef8b9264b139c87523f597183d865e32
:+1:
@jixiangcn Why did you close the issue? I think it should be kept open until the fix has been ported to this library. I don't want to patch my own version of angular-bootstrap for this.
A solution for this problem would be to calculate the scrollbar width and append the result to the tag as negative margin left.
For reference, the original fix is at https://github.com/twbs/bootstrap/commit/0907244256d923807c3a4e55f4ea606b9558d0ca . PRs are are welcome.
Faced with the same issue.
issue can be seen even on the bootstrap-ui documentation website
I am not able to reproduce it so I am not sure if this is stale or not. Please open an issue with a plunker if you think this is still an issue.
Thank you.
@Foxandxss This is still an issue, as @TilmannBach says, you can see it on the doco website at https://angular-ui.github.io/bootstrap/#/modal but make sure you are using a browser that consumes a scrollbar width on the page, like FF or Chrome on Windows.
Ah, missed the windows part. I am using mac with this annoying scrollbars.
I get the same effect on OS X with Chrome (46.0.2490.80 (64-bit)) & Firefox (41.0.2)
@NoelKennedy this will depend on your settings in OSX. If scrollbar is visible on page load = you will see the bug
Windows 10
- Edge: Ok
- IE 11: Ok
- Chrome 46: Bugged
@j3ffb Confirmed; I can toggle the problem on and off via OS X settings. The screenshot is OS X settings (under General). With 'Show scroll bars' set to 'Automatically....' the problem occurs. If you set it to 'When scrolling' the problem does not occur.
I'm not sure there's anything we can do here.
Maybe this suggestion will help with the problem: http://stackoverflow.com/a/20564773/915372 ?
Hello,
I don't know if this is still an issue for everyone but this should (hopefully) fix it:
CSS:
html {
overflow-y: scroll;
}
That forces the scroll bar to be displayed at all times regardless of whether it's actually needed or not.
@prasadrajandran that does stop the content from shifting, but it means the body can be scrolled while the modal is open, which feels wrong. I think we're all after a solution that's the best of both worlds -- scrolling is disabled, and content does not shift sideways.