From 0d04dcaebd7b0b0427ae3a6e79ddd86cd981b58f Mon Sep 17 00:00:00 2001 From: Heinrich Fenkart Date: Fri, 26 Sep 2014 00:10:41 +0200 Subject: grunt --- docs/dist/js/bootstrap.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'docs/dist/js/bootstrap.js') diff --git a/docs/dist/js/bootstrap.js b/docs/dist/js/bootstrap.js index bfcb88c7f..90dc202fa 100644 --- a/docs/dist/js/bootstrap.js +++ b/docs/dist/js/bootstrap.js @@ -1317,13 +1317,13 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re if (autoPlace) { var orgPlacement = placement - var $parent = this.$element.parent() - var parentDim = this.getPosition($parent) + var $container = this.options.container ? $(this.options.container) : this.$element.parent() + var containerDim = this.getPosition($container) - placement = placement == 'bottom' && pos.top + pos.height + actualHeight - parentDim.scroll > parentDim.height ? 'top' : - placement == 'top' && pos.top - parentDim.scroll - actualHeight < parentDim.top ? 'bottom' : - placement == 'right' && pos.right + actualWidth > parentDim.width ? 'left' : - placement == 'left' && pos.left - actualWidth < parentDim.left ? 'right' : + placement = placement == 'bottom' && pos.top + pos.height + actualHeight - containerDim.scroll > containerDim.height ? 'top' : + placement == 'top' && pos.top - containerDim.scroll - actualHeight < containerDim.top ? 'bottom' : + placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' : + placement == 'left' && pos.left - actualWidth < containerDim.left ? 'right' : placement $tip -- cgit v1.2.3