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

tooltip doesn't work with ng-animate and bootstrap 3.3.1 #2959

Closed
alexbyk opened this issue Nov 12, 2014 · 5 comments
Closed

tooltip doesn't work with ng-animate and bootstrap 3.3.1 #2959

alexbyk opened this issue Nov 12, 2014 · 5 comments

Comments

@alexbyk
Copy link

alexbyk commented Nov 12, 2014

http://plnkr.co/edit/AWYJyku4YJGv7UBPrRha?p=preview
Works without ngAnimate only (try to change in script.js)

@Hypercubed
Copy link
Contributor

I noticed this too. Not sure what is going on but ngAnimate (I think) it is not liking objects with two keys in the ng-class of the template. You can work around it for the moment by adding:

  .run(function($templateCache) {
      $templateCache.put("template/tooltip/tooltip-popup.html",
      "<div class=\"tooltip fade {{placement}}\" ng-class=\"{ in: isOpen() }\">\n" +
      "  <div class=\"tooltip-arrow\"></div>\n" +
      "  <div class=\"tooltip-inner\" ng-bind=\"content\"></div>\n" +
      "</div>\n" +
      "");    
    });

Notice that I have moved "fade" from the ng-class object to class.

(you can also remove ngAnimate or drop down to 1.2.6)

@fabienvauchelles
Copy link

+1

@chrisirhc
Copy link
Contributor

This is already fixed on master.

@alexbyk
Copy link
Author

alexbyk commented Nov 14, 2014

Hi. No, it isn't. Take a look at my link. I compiled your latest commit and used it in the example

@chrisirhc
Copy link
Contributor

Indeed, I forgot to push the fix for #2951 . This should be fixed now.

OronNadiv pushed a commit to lanetix/bootstrap that referenced this issue Nov 18, 2014
In Angular 1.3.1, when using tooltips with ngAnimate, this extra $digest
call seems to break ngClass. This is an extra call to ngAnimate and it
shouldn’t be called since the tooltip hasn’t been added to the DOM.

I was unable to create a test case to test compatibility with ngAnimate.

Fixes angular-ui#2951
Fixes angular-ui#2959
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants