aboutsummaryrefslogtreecommitdiff
path: root/docs/_includes/css/grid.html
diff options
context:
space:
mode:
authorAdrien Jarthon <[email protected]>2015-03-25 18:05:58 +0100
committerAdrien Jarthon <[email protected]>2015-03-25 18:05:58 +0100
commit0e8e5222ff9d48e72cb270ddf7b924e7c86760f0 (patch)
tree5739c98f5c20b6bf1b0c8d66982891faab12caef /docs/_includes/css/grid.html
parent2f3076f20acb6b34279b1ef77063a8fff33f756e (diff)
downloadbootstrap-0e8e5222ff9d48e72cb270ddf7b924e7c86760f0.tar.xz
bootstrap-0e8e5222ff9d48e72cb270ddf7b924e7c86760f0.zip
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.
Diffstat (limited to 'docs/_includes/css/grid.html')
0 files changed, 0 insertions, 0 deletions