You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 29, 2019. It is now read-only.
When using <div tooltip="{{ myTooltip }}">...</div>, and myTooltip is an empty string (or null or undefined), it seems reasonable not to show the tooltip. At the moment, an empty tooltip is shown, which looks a bit weird. I would suggest to hide the tooltip in this case.
What would be the best way to achieve this with the current functionality?
The text was updated successfully, but these errors were encountered:
OK, I see, thnx for pointing this out. I agree that it doesn't make much sense to show empty tooltips. Don't know how the original tooltip behaves in this respect but anyway, we yes, we shouldn't be showing tooltips when they content is empty.
As a work-around you might try changing the default template (https://github.com/angular-ui/bootstrap/blob/master/template/tooltip/tooltip-popup.html) and add this condition for the in class: in: isOpen() && tooltipTitle. It should do the trick but it would mean that we still do DOM manipulations for nothing so ultimatelly it should be fixed in code. I guess it will be a relatively small change so a pull request would be awesome!
It should be pretty straightforward; just check for scope.tt_tooltip at the top of show and return; when there's nothing to show. I should be able to get to this in the next few days, but a pull request would rock. :-)
I guess something similar should be done for the popover too...
@joshdmiller not sure how this should work for popover. Anyway, we've got a test now so even if we harmonize things we are safe, we shouldn't miss this use case.
When using
<div tooltip="{{ myTooltip }}">...</div>
, andmyTooltip
is an empty string (ornull
orundefined
), it seems reasonable not to show the tooltip. At the moment, an empty tooltip is shown, which looks a bit weird. I would suggest to hide the tooltip in this case.What would be the best way to achieve this with the current functionality?
The text was updated successfully, but these errors were encountered: