diff --git a/src/position/position.js b/src/position/position.js index 2a9d368c3b..4b78b604b4 100644 --- a/src/position/position.js +++ b/src/position/position.js @@ -464,17 +464,13 @@ angular.module('ui.bootstrap.position', []) positionArrow: function(elem, placement) { elem = this.getRawNode(elem); - var isTooltip = true; - - var innerElem = elem.querySelector('.tooltip-inner'); - if (!innerElem) { - isTooltip = false; - innerElem = elem.querySelector('.popover-inner'); - } + var innerElem = elem.querySelector('.tooltip-inner, .popover-inner'); if (!innerElem) { return; } + var isTooltip = angular.element(innerElem).hasClass('tooltip-inner'); + var arrowElem = isTooltip ? elem.querySelector('.tooltip-arrow') : elem.querySelector('.arrow'); if (!arrowElem) { return;