twbs/bootstrap — pull request #12328 by benogle (2014-01-21 18:41:26+00:00)
Title: Add tooltip `viewport` option, respect bounds of the viewport

Currently tooltips do not respect their container. eg. I have a button jammed up against the right side of the page, and place a tooltip on the top, it will stick out of the page.

So I added two new options:
* `viewport`: defaults to `'body'`. It's the selector the tip should stay inside.
* `viewport: padding`: how far, in px should it stay from the edges

With changes from the original at #11593. The tests pass for me in firefox.

@fat: What was the new offset method you mentioned in the other pull?