angular-ui/bootstrap — pull request #879 by hall5714 (2013-08-25 23:36:05+00:00)
Title: feat(modal): added bootstrap3 support

Updated for the new branch.

I added the `modal-open` class when a modal opens and remove it when it closes, but this may open a can of worms. In Bootstrap 3 they decided to add a modals scrollbar to the `modal` itself, rather than `modal-body`.

This is causing a 15px shift in the rest of the body, because the modal scrollbar is absolutely positioned (whereas the body's is not). This is still being worked on per https://github.com/twbs/bootstrap/issues/9855. The last response to this suggets progmatically determine how wide the scrollbar is on that particular browser, than add a `margin-right` to the body to offset the difference between the scrollbars. The only way I'm aware of how to do this is to make a hidden element, add it to the dom and get the difference between the `element.clientWidth` and the `element.offsetWidth`. Totally worth it to have the scrollbars on the `body` rather than `modal-body`, right? :angry:

The other issue we may run into, that I haven't tested, is that stacked modals *may* have multiple scrollbars. So if we have 2 modals in the stack, 2 scrollbars may show. I haven't really tested this so maybe the absolute positioning of the modals will render that moot (the scrollbar of the top modal may overlay the modal below it... hopefully).