From aeebb6bf43c050e984ee73c61a6004253b288286 Mon Sep 17 00:00:00 2001 From: ggoodman Date: Tue, 12 Mar 2013 18:31:59 -0300 Subject: [PATCH] Add tooltips to body to avoid css adjacency issues Currently, tooltip markup is added `after` the element on which the directive is defined. As a result, any adjacency selectors based on the element having a controlled set of siblings will be affected. This change will add the tooltip element as a child of the body instead. --- src/tooltip/tooltip.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tooltip/tooltip.js b/src/tooltip/tooltip.js index 7af22a45b3..782827da8a 100644 --- a/src/tooltip/tooltip.js +++ b/src/tooltip/tooltip.js @@ -12,7 +12,7 @@ angular.module( 'ui.bootstrap.tooltip', [] ) templateUrl: 'template/tooltip/tooltip-popup.html' }; }) -.directive( 'tooltip', [ '$compile', '$timeout', '$parse', '$window', function ( $compile, $timeout, $parse, $window) { +.directive( 'tooltip', [ '$compile', '$timeout', '$parse', '$window', '$document', function ( $compile, $timeout, $parse, $window, $document) { var template = '