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

Tooltip sometimes not working after upgrading from UIBS 0.13 to 1.3 #6047

@nevcos

Description

@nevcos

Bug description:

Tooltips randomly not showing when using angular-timer, after upgrading from UIBS 0.13 to 1.3.

Link to minimally-working plunker that reproduces the issue:

Working with UIBS 0.13.0:
https://plnkr.co/edit/ba5RKLV8iE26nMjUGSRp?p=preview

Not working with UIBS 1.3.3:
https://plnkr.co/edit/5zqITvTfQGzfgAb0Fv1u?p=preview

Tested versions

Angular: 1.5.7
Angular-timer: 1.3.4
Bootstrap: 3.3.6
UIBS: 1.3.3 and 2.2.0

More debug details

On the following code of UIBS, when the tooltip don't work, the interpolateFnWatchAction is only called on mouse leave. When it works, the function is executed only on mouse enter:

($$observers[name] || ($$observers[name] = [])).$$inter = true;
(attr.$$observers && attr.$$observers[name].$$scope || scope).
  $watch(interpolateFn, function interpolateFnWatchAction(newValue, oldValue) {
    //special case for class attribute addition + removal
    //so that class changes can tap into the animation
    //hooks provided by the $animate service. Be sure to
    //skip animations when the first digest occurs (when
    //both the new and the old values are the same) since
    //the CSS classes are the non-interpolated values
    if (name === 'class' && newValue != oldValue) {
      attr.$updateClass(newValue, oldValue);
    } else {
      attr.$set(name, newValue);
    }
  });

One example of one of the tooltips that works on some routes and not in others, but this applies to all tooltips.

<li id="recent-calls-footer" class="footer-btn" uib-tooltip="Recent Calls">
    <a href="/search/recentCalls" style="display: block;" analytics-on="click" analytics-event="Recent Calls" analytics-category="Navigation" tpn-route="">
        <i class="icon-phone footer-icon" style="top:-3px; left:4px"></i>
        <span class="footer-icon-text ng-binding">3</span>
    </a>
</li>

Also noticed that when tooltips don't work, the tooltip element is created but without content, without attributes interpolation and without the "in" class:

<div class="tooltip ng-isolate-scope top fade" tooltip-animation-class="fade" uib-tooltip-classes="" ng-class="{ in: isOpen() }" uib-tooltip-popup="" uib-title="{{title}}" content="{{content}}" placement="{{placement}}" popup-class="{{popupClass}}" animation="animation" is-open="isOpen" origin-scope="origScope" style="top: 342px; left: 19px;">
  <div class="tooltip-arrow"></div>
  <div class="tooltip-inner ng-binding" ng-bind="content"></div>
</div>

With this scope:
image

And when it works (after retrying some more times), the element is:

<div class="tooltip ng-isolate-scope top fade in" tooltip-animation-class="fade" uib-tooltip-classes="" ng-class="{ in: isOpen() }" uib-tooltip-popup="" uib-title="" content="Recent Calls" placement="top" popup-class="" animation="animation" is-open="isOpen" origin-scope="origScope" style="top: 330px; left: -11px;">
  <div class="tooltip-arrow"></div>
  <div class="tooltip-inner ng-binding" ng-bind="content">Recent Calls</div>
</div>

With this scope:
image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions