bootstrap/js
Adrien Jarthon 0e8e5222ff Tooltip/popover: Fix auto placement to use viewport
Currently, auto placement is using the container dimensions (if provided) or the element's parent to determine where to open the tooltip:
```javascript
var $container   = this.options.container ? $(this.options.container) : this.$element.parent()
var containerDim = this.getPosition($container)
```
This is quite broken in fact, because the parent element could be just a small div outside the element for example, leading in a totally random placement (placing the tooltip on top even if there's no room). And the container can also be outside of the viewport.

This fix simply uses the viewport instead, that's the purpose of the viewport actually, to position the tooltip.
So the auto placement should use it to find where there's more room.
By default this is body, which is good.
2015-03-25 18:05:58 +01:00
..
tests Merge pull request #15987 from twbs/fix-15972 2015-03-24 08:57:56 -07:00
.jscsrc Update JSCS config for the new version. 2015-01-16 17:49:58 +02:00
.jshintrc Revert UMD (#13772 & friends) for now, due to #13812. 2014-06-23 11:11:59 -07:00
affix.js v3.3.2 => v3.3.4 2015-03-16 08:39:31 -07:00
alert.js v3.3.2 => v3.3.4 2015-03-16 08:39:31 -07:00
button.js v3.3.2 => v3.3.4 2015-03-16 08:39:31 -07:00
carousel.js v3.3.2 => v3.3.4 2015-03-16 08:39:31 -07:00
collapse.js v3.3.2 => v3.3.4 2015-03-16 08:39:31 -07:00
dropdown.js Fix #16072: Clicking into input field within dropdown no longer closes the dropdown 2015-03-21 16:00:15 -07:00
modal.js Merge pull request #16024 from twbs/unnecessary-parsing 2015-03-18 22:28:07 -07:00
popover.js v3.3.2 => v3.3.4 2015-03-16 08:39:31 -07:00
scrollspy.js v3.3.2 => v3.3.4 2015-03-16 08:39:31 -07:00
tab.js v3.3.2 => v3.3.4 2015-03-16 08:39:31 -07:00
tooltip.js Tooltip/popover: Fix auto placement to use viewport 2015-03-25 18:05:58 +01:00
transition.js v3.3.2 => v3.3.4 2015-03-16 08:39:31 -07:00