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

Popover / Tooltip positioning with appendToBody set to true #387

Closed
bowenisdum opened this issue May 2, 2013 · 7 comments
Closed

Popover / Tooltip positioning with appendToBody set to true #387

bowenisdum opened this issue May 2, 2013 · 7 comments

Comments

@bowenisdum
Copy link
Contributor

Not sure if this is a real bug or not, but on the project I am working on, the tooltip/popover position is wrong when appendToBody is set to true, the position = $position.position( element ); returns the offset relative to the parent of the tooltip triggering element, not the body, it seems to be fixed by setting position = $position.offset( element ); when the appendToBody option is true

@pkozlowski-opensource
Copy link
Member

@bowenisdum I think I know what you are talking about and I think it is a good catch! Would you mind preparing a small plunk with a reproduce scenario (we need to make sure that we are fixing the right thing!)? Or better yet, send a pull request - it should be fairly easy, you will get famous and the whole community will be grateful :-)

@bowenisdum
Copy link
Contributor Author

let me try to do that

@joshdmiller
Copy link
Contributor

Doh! Since we can't set provider options in the official demo, I'm thinking we should add a local *-append-to-body attribute just so we can include one in the demo to avoid regressions.

@pkozlowski-opensource
Copy link
Member

+1 @joshdmiller

Now that we've got positioning right (or at least I hope so!) the "append to body" option is really useful only for cases where people are using pseud-elements CSS selectors. Which means that it really depends on an element (its placement) and probably shouldn't be set globally in a provider.

@bowenisdum
Copy link
Contributor Author

http://plnkr.co/edit/UhmeEPucwQrbuJzASBNj?p=preview here is a plunk that replicates the problem i will try to send the pull request now..

@joshdmiller
Copy link
Contributor

@pkozlowski-opensource When #369 gets merged, I want to make some simple changes to the provider's API and add documentation for it, so that would be a good time to add the new attribute as well.

@pkozlowski-opensource
Copy link
Member

Works OK after the fix: http://plnkr.co/edit/QXac7aS0tDIvzoALil8Z?p=preview

lanterndev added a commit to getlantern/lantern-ui that referenced this issue Jun 15, 2013
temporarily use 0.4.0-SNAPSHOT release of angular-ui-bootstrap while the fix
for angular-ui/bootstrap#387 has not yet been released
lanterndev added a commit to getlantern/lantern-ui that referenced this issue Jun 16, 2013
temporarily use 0.4.0-SNAPSHOT release of angular-ui-bootstrap (with additional
patch to support tooltip-placement="mouse") while the fix for
angular-ui/bootstrap#387 has not yet been released
lanterndev added a commit to getlantern/lantern-ui that referenced this issue Jun 16, 2013
temporarily use 0.4.0-SNAPSHOT release of angular-ui-bootstrap
while the fix for angular-ui/bootstrap#387 has not yet been released
(with additional patch to support tooltip-placement="mouse")
lanterndev added a commit to getlantern/lantern-ui that referenced this issue Jun 16, 2013
temporarily use 0.4.0-SNAPSHOT release of angular-ui-bootstrap
while the fix for angular-ui/bootstrap#387 has not yet been released
(with additional patch to support tooltip-placement="mouse")
lanterndev added a commit to getlantern/lantern-ui that referenced this issue Jun 17, 2013
temporarily use 0.4.0-SNAPSHOT release of angular-ui-bootstrap
while the fix for angular-ui/bootstrap#387 has not yet been released
(with additional patch to support tooltip-placement="mouse")
lanterndev added a commit to getlantern/lantern-ui that referenced this issue Jun 17, 2013
temporarily use 0.4.0-SNAPSHOT release of angular-ui-bootstrap
while the fix for angular-ui/bootstrap#387 has not yet been released
(with additional patch to support tooltip-placement="mouse")
lanterndev added a commit to getlantern/lantern-ui that referenced this issue Jun 17, 2013
temporarily use custom built version of angular-ui-bootstrap
while the fix for angular-ui/bootstrap#387 has not yet been released
with additional patch to support tooltip-placement="mouse"
lanterndev added a commit to getlantern/lantern-ui that referenced this issue Jun 17, 2013
temporarily use custom built version of angular-ui-bootstrap
while the fix for angular-ui/bootstrap#387 has not yet been released
with additional patch to support tooltip-placement="mouse"
lanterndev added a commit to getlantern/lantern-ui that referenced this issue Jun 17, 2013
Temporarily use custom built version of angular-ui-bootstrap
while the fix for angular-ui/bootstrap#387 has not yet been released
with additional patch to support tooltip-placement="mouse". Once
angular-ui/bootstrap#527 is merged and 0.4.0 is released, can switch to
including "angular-ui-bootstrap-bower": "~0.4.0" in bower.json.
lanterndev added a commit to getlantern/lantern-ui that referenced this issue Jun 19, 2013
Temporarily use custom built version of angular-ui-bootstrap
while the fix for angular-ui/bootstrap#387 has not yet been released
with additional patch to support tooltip-placement="mouse". Once
angular-ui/bootstrap#527 is merged and 0.4.0 is released, can switch to
including "angular-ui-bootstrap-bower": "~0.4.0" in bower.json.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants