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

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(tooltip): fix positioning error when appendToBody is set to true
Closes #387

use offset function instead position function when appednToBody is set to true
  • Loading branch information
bowenisdum authored and pkozlowski-opensource committed May 4, 2013
1 parent d87ed0e commit 76fee1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tooltip/tooltip.js
Expand Up @@ -167,9 +167,9 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position' ] )
} else {
element.after( tooltip );
}

// Get the position of the directive element.
position = $position.position( element );
position = options.appendToBody ? $position.offset( element ) : $position.position( element );

// Get the height and width of the tooltip so we can center it.
ttWidth = tooltip.prop( 'offsetWidth' );
Expand Down

0 comments on commit 76fee1f

Please sign in to comment.