1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-25 21:09:06 +02:00

Fix tooltip misplacement with "auto top"

Fixes #14322.
Closes #14581.
This commit is contained in:
saranya.r
2014-09-09 18:47:06 +05:30
committed by Heinrich Fenkart
parent c5c67d0f54
commit db9e8ee813
2 changed files with 51 additions and 1 deletions

View File

@@ -192,7 +192,7 @@
var parentDim = this.getPosition($parent)
placement = placement == 'bottom' && pos.top + pos.height + actualHeight - parentDim.scroll > parentDim.height ? 'top' :
placement == 'top' && pos.top - parentDim.scroll - actualHeight < 0 ? 'bottom' :
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