-
Notifications
You must be signed in to change notification settings - Fork 6.7k
fix(tooltip): update placement on content change #96
Comments
@joshdmiller can we close this? Trying to clean up old issues a bit. |
@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. |
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. |
@jrabbe - It was only a matter of time until this affected someone. :-) |
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 |
angular-ui#96. Essentially hides the tooltip and shows it again if it was open.
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
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
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
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
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
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
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
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
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
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
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
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
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.
The text was updated successfully, but these errors were encountered: