angular-ui/bootstrap — pull request #2425 by MrOrz (2014-07-06 13:36:57+00:00)
Title: fix(modal): port of @thcipriani's solution to modal body shift

This pull request addresses the scrolling problem that dates back to an old issue https://github.com/twbs/bootstrap/issues/9855, which is also related to #879.

When the modal dialog opens, the content of `body` is shifted due to the absence of the vertical scrollbar.

![out](https://cloud.githubusercontent.com/assets/108608/3488990/6e63bc44-0510-11e4-943e-0dc3162c7bae.gif)

Demonstration of the bug: http://plnkr.co/edit/aEaIphp0kGBC3G9dNw6j

[The solution](https://github.com/twbs/bootstrap/pull/13103) was proposed by @thcipriani in March this year, and is shipped with Bootstrap v3.2.0. This pull request contains a port of @thcipriani 's solution.

Demonstration of the solution: http://plnkr.co/edit/n1OQrpXPx7MTcozZrJA7

For Bootstrap v3.1.1, we need to add the following CSS for the solution to work.

```css
.modal-scrollbar-measure {
position: absolute;
top: -9999px;
width: 50px;
height: 50px;
overflow: scroll;
}

.modal-open .modal {
overflow-x: hidden;
overflow-y: auto;
}
```