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

fix(tooltip): update placement on content change #96

Closed
joshdmiller opened this issue Jan 25, 2013 · 5 comments · Fixed by #3435
Closed

fix(tooltip): update placement on content change #96

joshdmiller opened this issue Jan 25, 2013 · 5 comments · Fixed by #3435

Comments

@joshdmiller
Copy link
Contributor

Right now, the tooltip attribute is observed and so is properly bound. But the position of the tooltip is not updated when the attribute changes, and so then appears off-center.

If you go to the demo page, click in the "Dynamic Tooltip Popup" input, hover over the "dynamic" tooltip, and then proceed to change the value, you can see the issue.

This is very minor right now, but one of the features to still be ported from Twitter's jQuery version will keep the tooltip open, and thus the artifact would be visible.

@ajoslin
Copy link
Contributor

ajoslin commented Mar 18, 2013

@joshdmiller can we close this? Trying to clean up old issues a bit.

@joshdmiller
Copy link
Contributor Author

@ajoslin It hasn't been fixed yet, if that's what you mean. This is a bug I noticed in testing the original version, but it's not likely to impact many people; in order to experience the defect, the tooltip text has to be changed while the tooltip is open. I'll close it and we can reopen it in the future if it ever ends up affecting anyone.

@jrabbe
Copy link

jrabbe commented Jul 1, 2013

We are running into exactly this problem in our application. We have a "select all" button on a list which shows a tooltip with the currently selected number of items. For large lists this can update very quickly.

Below is how it looks initially, right after you click the "select all" button, and after you move the cursor away and back.

tooltip-resizing

@joshdmiller
Copy link
Contributor Author

@jrabbe - It was only a matter of time until this affected someone. :-)

@joshdmiller joshdmiller reopened this Jul 1, 2013
@dtjohnson
Copy link

I'm running into this issue as well. I have an undo button that shows a tooltip displaying what will be undone (e.g. "Undo Create Entry"). Once they click the button and the undo is performed, the tooltip is updated to the next message in the stack or the button is disabled and the tooltip should be hidden if they are at the bottom of the stack.

The real annoyance is when the button is disabled. The empty tool tip just floats there with no way to close it. Here's an example: http://plnkr.co/edit/zqZMFxFurepA0uY8A4bf?p=preview

ventuc added a commit to ventuc/bootstrap that referenced this issue Dec 9, 2013
angular-ui#96. Essentially hides the
tooltip and shows it again if it was open.
bekos added a commit to bekos/bootstrap that referenced this issue Dec 15, 2013
Given that the recompute of position is a heavy calculation and the only immune placement to this bug was `right` ,
two kind of fixes had to been made:
1. For `left` placement use the right css style option instead of left.
2. For the `top` and `bottom` placement keep reference of the last known middle position of the directive element
  and use it when re-calculating the position with the new tooltip width.

Closes angular-ui#96
bekos added a commit to bekos/bootstrap that referenced this issue Dec 16, 2013
Since the recompute of position is a heavy calculation and given
that this happens only when tooltip is visible, ie position
is already calculated, we can reuse it to update the position when
widht/height changes.

Closes angular-ui#96
bekos added a commit to bekos/bootstrap that referenced this issue Dec 18, 2013
Since the recompute of position is a heavy calculation and given
that this happens only when tooltip is visible, ie position
is already calculated, we can reuse it to update the position when
widht/height changes.

Closes angular-ui#96
bekos added a commit to bekos/bootstrap that referenced this issue Dec 18, 2013
Since the recompute of position is a heavy calculation and given
that this happens only when tooltip is visible, ie position
is already calculated, we can reuse it to update the position when
widht/height changes.

Closes angular-ui#96
bekos added a commit to bekos/bootstrap that referenced this issue Dec 18, 2013
Since the recompute of position is a heavy calculation and given
that this happens only when tooltip is visible, ie position
is already calculated, we can reuse it to update the position when
widht/height changes.

Closes angular-ui#96
bekos added a commit to bekos/bootstrap that referenced this issue Dec 22, 2013
Since the recompute of position is a heavy calculation and given
that this happens only when tooltip is visible, ie position
is already calculated, we can reuse it to update the position when
widht/height changes.

Closes angular-ui#96
bekos added a commit to bekos/bootstrap that referenced this issue Dec 26, 2013
Since the recompute of position is a heavy calculation and given
that this happens only when tooltip is visible, ie position
is already calculated, we can reuse it to update the position when
widht/height changes.

Closes angular-ui#96
bekos added a commit to bekos/bootstrap that referenced this issue Dec 27, 2013
Since the recompute of position is a heavy calculation and given
that this happens only when tooltip is visible, ie position
is already calculated, we can reuse it to update the position when
widht/height changes.

Closes angular-ui#96
bekos added a commit to bekos/bootstrap that referenced this issue Dec 29, 2013
Since the recompute of position is a heavy calculation and given
that this happens only when tooltip is visible, ie position
is already calculated, we can reuse it to update the position when
widht/height changes.

Closes angular-ui#96
chrisirhc added a commit to chrisirhc/angular-ui-bootstrap that referenced this issue Mar 25, 2015
Reposition on each digest, this ensures that the tooltip is always positioned
correctly no matter how its content changes.

Fixes angular-ui#96
Fixes angular-ui#1109
Closes angular-ui#2816
chrisirhc added a commit to chrisirhc/angular-ui-bootstrap that referenced this issue Mar 25, 2015
Reposition on each digest, this ensures that the tooltip is always positioned
correctly no matter how its content changes.

Fixes angular-ui#96
Fixes angular-ui#1109
Closes angular-ui#2816
Closes angular-ui#3435
@chrisirhc chrisirhc added this to the 0.13.0 milestone Mar 25, 2015
chrisirhc added a commit to chrisirhc/angular-ui-bootstrap that referenced this issue Mar 27, 2015
Reposition on each digest, this ensures that the tooltip is always positioned
correctly no matter how its content changes.

Fixes angular-ui#96
Fixes angular-ui#1109
Closes angular-ui#2816
Closes angular-ui#3435
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.

5 participants