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

Tooltip and popover positioning issue inside the modal #265

Closed
timofei-iatsenko opened this issue Mar 25, 2013 · 8 comments
Closed

Tooltip and popover positioning issue inside the modal #265

timofei-iatsenko opened this issue Mar 25, 2013 · 8 comments
Milestone

Comments

@timofei-iatsenko
Copy link

If you insert popover or tooltip directives into the modal dialog the won't render correct.
See it in the fiddle:

http://jsfiddle.net/gBadF/

Implementation from boostrap team works correct with the modals.

@redaemn
Copy link

redaemn commented Mar 25, 2013

I think something is missing with your fiddle. Here http://jsfiddle.net/redaemn/gBadF/1/ I updated it with the code that make the popover "pop out". The bug is visible now.

@timofei-iatsenko
Copy link
Author

Oh yes, look like i didn't save changes in my fiddle... Thx for fixing it.

joshdmiller referenced this issue Mar 27, 2013
Tooltips and popovers can now be appended to the body of the HTML
document instead of directly after the element on which the directive
was invoked, by setting `appendToBody` to true through
$tooltipProvider.options().

The tooltip specs were refactored slightly to bucket all
provider-related specs under a single `describe` for cleanliness.
@maxisam
Copy link

maxisam commented Mar 29, 2013

Can we use element[0].offsetTop instead of element[0].getBoundingClientRect() ? However, it doesn't work in IE8 with in modal popup.

@pkozlowski-opensource
Copy link
Member

@maxisam this is what we used to use but it was causing issues with positioning inside a table:
#115

But given number of problems this "fix" introduced it is clear that we are not done here. We could revert the #115 but we need to find a solution for it as well. @maxisam would be awesome if you could give us a hand with those items!

@maxisam
Copy link

maxisam commented Mar 29, 2013

Oops, what a dilemma. I knew there must be a reason not using this solution, since it is kinda obvious. Of course, I wanna help, if I can find a solution. : )

@kakoni
Copy link

kakoni commented Apr 9, 2013

So this posiotining problem can happen also outside modals, as demonstrated here;
http://plnkr.co/edit/dQxCN4S6zlzoJraMgQgr?p=preview

@valorkin
Copy link

Trouble with tooltips http://jsfiddle.net/gBadF/2/

@pkozlowski-opensource
Copy link
Member

@valorkin Yep, we are aware of this and we are really close to resolving it, see:
#326

The fix should make it into 0.3.0 which is not far away!

joshdmiller pushed a commit that referenced this issue Apr 26, 2013
To calculate the relative position of the tooltip or popover, the
$tooltip service now uses the $position service, which resolves many
positioning bugs.

Closes #265, #115
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants