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

Commit 93a82af

Browse files
fix(popover): correctly position popovers appended to body
Closes #682
1 parent 56f624a commit 93a82af

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/position/test/test.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ <h3>Within relative-positioned DIV</h3>
6767

6868
<h3>Within absolute-positioned DIV</h3>
6969

70-
<div style="position: absolute; left: 400px" class="container">
71-
<div class="content" position>Content</div>
70+
<div style="position: absolute; left: 400px; top: 400px" class="container">
71+
<div class="content" position>Content - absolute</div>
7272
</div>
7373

7474
<h3>Within overflowing absolute-positioned DIV</h3>
7575
<div class="container" style="height: 50px; overflow: scroll;overflow-x: hidden; position: absolute;">
7676
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur non velit nulla. Suspendisse sit amet tempus diam. Sed at ultricies neque. Suspendisse id felis a sem placerat ornare. Donec auctor, purus at molestie tempor, arcu enim molestie lacus, ac imperdiet massa urna eu massa. Praesent velit tellus, scelerisque a fermentum ut, ornare in diam. Phasellus egestas molestie feugiat. Vivamus sit amet viverra metus.
77-
<div class="content" position>Content</div>
77+
<div class="content" position>Content absolute overflow</div>
7878
</div>
7979

8080
<br>

src/tooltip/tooltip.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position' ] )
181181
}
182182

183183
// Get the position of the directive element.
184-
position = options.appendToBody ? $position.offset( element ) : $position.position( element );
184+
position = appendToBody ? $position.offset( element ) : $position.position( element );
185185

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

0 commit comments

Comments
 (0)