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

Tooltips and Popover are incorrectly placed when using *-append-to-body #682

Closed
chubbard opened this issue Jul 18, 2013 · 8 comments
Closed

Comments

@chubbard
Copy link

If I turn on append-to-body attribute on either tooltip or popover they are incorrectly placed because the calculation aren't performed correctly. They are always assumed to be relative to the parent element. The following line should be (ie correct):

position = appendToBody ? $position.offset( element ) : $position.position( element 
);

Instead of (ie bug)

position = options.appendToBody ? $position.offset( element ) : $position.position( element );
@pkozlowski-opensource
Copy link
Member

What is the version of the library that you are using? Please provide the live reproduce scenario using http://plnkr.co/

@chubbard
Copy link
Author

I'm using 0.4.0. It has to be a somewhat complicated layout in HTML in order for the difference to show in calculations. There has to be enough nesting and space between the parent element of the tooltip and the body for there to be a calculation difference. The problem is just that options.appendToBody is never set anywhere.

@pkozlowski-opensource
Copy link
Member

@chubbard I'm sure that there is an issue somewhere since you are seeing it in your app. But we need a minimal reproduce scenario (or better yet - a pull request!). Basically we can't fix bugs if we can't reproduce them :-(
So please, try to provide the live reproduce scenario using http://plnkr.co/

@chubbard
Copy link
Author

Ok so here is a plunker showing the problem. You have to use absolutely positioned elements. You can also see that the mouse pointer relative popup also has problems in this case too, but the bottom popup is the one showing the problem.

http://plnkr.co/edit/JO4U0LBDi0MEXmh6fXWh?p=preview

@pkozlowski-opensource
Copy link
Member

Thnx @chubbard for the reproduce scenario! This is definitively a bug, going to look into this one in the coming days.

@pkozlowski-opensource
Copy link
Member

This is fixed in master already via 93a82af. Here is the working plunk with a version from the CI server: http://plnkr.co/edit/tq4QM0LA9nR9UufpO0L1?p=preview

Thnx for pointing this one out!

@NotJustClarkKent
Copy link

Glad to see there is a fix for this issue, do you know if this fix will be added into gh-pages anytime soon?

@cheshire137
Copy link

Could this be fixed in 0.4.0? I can't upgrade to 0.5.0 or 0.6.0 because nested tabsets don't work.

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

No branches or pull requests

4 participants