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

Indeterminant tooltip position with element near screen edge #5914

Closed
Jefftopia opened this issue May 20, 2016 · 5 comments
Closed

Indeterminant tooltip position with element near screen edge #5914

Jefftopia opened this issue May 20, 2016 · 5 comments

Comments

@Jefftopia
Copy link

Jefftopia commented May 20, 2016

Bug description:

UIB tooltip alternates between bad position and desired position. Specifically, with elements near the edge of the screen. In this case, a float-right anchor. The tooltip has default position (top).

You'll notice that changing the element tag has no affect, and neither does changing the positioning to, for example, absolute with right: 0. The same result: an indeterminant tooltip position. I think it must therefore be related to the screen edge.

I explored whether this was a caching issue. I do not believe so. I am precaching locally and it does not resolve the issue. In the plunkr, I cache the template, and have verified it is in my chrome cache by inspecting chrome://cache.

Link to minimally-working plunker that reproduces the issue:

Plunker is here.

Version Info

Angular: 1.5.3

UIBS: 1.3.2

Bootstrap: 3.3.6

@RobJacobs
Copy link
Contributor

RobJacobs commented May 20, 2016

This is because the text is wrapping in the tooltip causing the tooltip container to grow. I believe the TWBS tooltip exhibits the same problem.

@wesleycho
Copy link
Contributor

I think this can be solvable if we modify the $uibPosition.positionElement method to insert the element into the DOM to properly calculate the height and then calculate proper positioning I think @RobJacobs .

@wesleycho
Copy link
Contributor

I should note that since this is a breaking change, this will be fixed upon major version release, so 2.0.0 at earliest (after our 1.3.3 release, we are likely to start work on it).

@Jefftopia
Copy link
Author

@RobJacobs @wesleycho Thanks for the responses. I'll be sure to keep an eye on this ticket.

@wesleycho
Copy link
Contributor

Going to close as tracked by #5918

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.

3 participants