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

Add tooltips to body to avoid css adjacency issues #218

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 2 additions & 2 deletions src/tooltip/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
'<tooltip-popup '+
Expand Down Expand Up @@ -79,7 +79,7 @@ angular.module( 'ui.bootstrap.tooltip', [] )

// Now we add it to the DOM because need some info about it. But it's not
// visible yet anyway.
element.after( tooltip );
$document.find( 'body' ).append( tooltip );

// Get the position of the directive element.
position = getPosition();
Expand Down