Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

fix(position): positionArrow descendant selector #5246

Merged
merged 1 commit into from
Jan 14, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions src/position/position.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down