-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Tooltip bug (version 0.13.3) #4195
Comments
https://github.com/angular-ui/bootstrap/blob/master/CONTRIBUTING.md#you-think-youve-found-a-bug Please provide a reproduction via Plunker, which would allow us to debug and fix this much quicker. |
Ok i do it later, or tomorrow :) |
http://plnkr.co/edit/QKnq5z?p=preview this is the Plunker, i think the problem only is on |
I'm having trouble when Bootstrap version is 3.3.5. The tooltips are shown on wrong position. |
I also found this to be the case. The position was slightly off in 0.12.x, it got fixed in 0.13.0 and now in 0.13.3 its slightly off again. |
Hello, I've analysed the problem:
When the content is changed, the tooltip box size is adapted to the content from the current position (few width because the content is push on the right side) - it can take multiples line because the word-wrap is normal. Best regards, Damien |
Still buggy. The tooltip appears on wrong position by a fraction of a second and then is shown correctly. Move the mouse pointer between "R", "U" and "D" back and forth to see the bug. |
There is an update in |
This still happens if you don't have transitions on the tooltip. @skarllot you can try something like this, if you're not using Bootstrap's CSS: .tooltip{
opacity: 0;
transition: opacity 300ms ease;
}
.tooltip.in{
opacity: 1;
} |
The problem is linked to the fact that the tooltip is first created empty. Here is the modified part of src/tooltip/tooltip.js var positionTooltip = function() {
if (!tooltip || !tooltip.html()) { return; }
if (!positionTimeout) {
positionTimeout = $timeout(function() {
// Reset the positioning and box size for correct width and height values.
tooltip.css({ top: 0, left: 0, width: 'auto', height: 'auto', visibility: 'none' }); Here is plunker version with the update: http://embed.plnkr.co/jdZaK4ITf0uRNK7LpasG/ |
Mind filing a quick PR with the fix? |
Yep I can do that ^^, just I would like to have a feedback from crisbeto to know if it is correct for him. |
…cond - Avoid position computation when tooltip is empty - Force visibility to none when resetting style Fixes: angular-ui#4195
I don't think it works @dabos-GFI, a couple of things I noticed:
|
Did you tried the Plunker: http://plnkr.co/edit/jdZaK4ITf0uRNK7LpasG?p=preview ? |
Have you tried your project, with my version of the code : http://embed.plnkr.co/jdZaK4ITf0uRNK7LpasG/ui-bootstrap.js ? |
Well I had applied your changes manually. I couldn't get it to break with the one you just linked 👍 |
- Force hidden visibility at creation time Fixes: angular-ui#4195
Another check with the original plunker for this bug: http://plnkr.co/edit/gX3niy?p=preview |
Seems alright for me. |
- Avoid position computation when tooltip is empty - Force visibility to none when resetting style Closes angular-ui#4363 Fixes angular-ui#4195
Hello Guys :) i updated today my ui-bootstrap and get now the same problem.. uib-tooltip crash when it is to long :/ |
@AndreasHo I updated the original plunk you created to use the supported libraries: Angular 1.3.4 to 1.4.7 and the most recent (0.14.2) angular-ui-bootstrap release here. I'm not seeing a 'crash'? |
Hello, ok i have used the ui-bootstrap 0.14.1... http://plnkr.co/edit/5wfB26?p=preview
|
When using a tooltip in an absolute positioned element, you need tooltip-append-to-body="true" |
wow, thanks! |
- Avoid position computation when tooltip is empty - Force visibility to none when resetting style Closes angular-ui#4363 Fixes angular-ui#4195
- Avoid position computation when tooltip is empty - Force visibility to none when resetting style Closes angular-ui#4363 Fixes angular-ui#4195
@RobJacobs Works like a charm, thanks! Maybe the doc should be updated to explain the trick. |
@RobJacobs Thanks for your tip! You solved my huge problem with bouncing tooltip position! Old tip but still working! Have a nice day! |
Hello Guys,
i have a problem with showing the tooltip, wenn it get to much letters it crash.
Example:
"Data..." => the tooltip is good
"Advanced settings..." => the tooltip crash :(
it is over the Button or link and it shimmer.
I hope one of you can fix the problem :)
bye Andreas
The text was updated successfully, but these errors were encountered: