2

Please see the plunker below: http://plnkr.co/edit/RPpjULZsSDnTFPKiafl2

Basically, the angular-ui tooltip remains when moving up / down to a position where ng-disabled is true. Any thoughts on how to fix the issue would be much appreciated!

I'm using Chrome, but the issue appears more serious in Firefox where even with ng-disabled removed the tooltips still remain on mouseleave.

Andrew
  • 880
  • 2
  • 10
  • 19
  • Why are you separating the element attributes using a comma? That's not valid html. In any case [see this answer](http://stackoverflow.com/a/16653079/238427) especially the edit based on @cotten comments. That seems to be the same issue that you have – JoseM Apr 29 '14 at 17:29
  • Thanks @JoseM! I did see that answer before posting but couldn't get it to solve my problem. I actually also have an issue where the tooltip actually moves as well when you move an item in a repeat but I wasn't able to replicate that in a plunker so is probably a scope issue. The commas are just cause I'm clearly spending too much time writing in Jade. – Andrew Apr 30 '14 at 01:47

2 Answers2

3

You can use the $tooltipProvider and alter the trigger map to take click as an additional hide trigger for the mouseenter show trigger:

myApp.config(['$tooltipProvider', function($tooltipProvider){
  $tooltipProvider.setTriggers({
    'mouseenter': 'mouseleave click'
  });
}]);

v0.9.0 of AngularUI suffered from this issue which caused errors (although still worked) on delete buttons (for instance) which had a tooltip. This has been subsequently fixed in v0.10.0.

Here's a demo of it in action

Patrick
  • 3,490
  • 1
  • 37
  • 64
0

I assume ng-disabled also disables any events from triggering on the buttons. Then, when you move a row down to the last row (or up to the first), the event handlers are disabled before the mouseout event is handled. It works if you trigger the mouseout event "manually" when the click event is handled.

plunker

This may actually be a bug worth pointing out to the angular team.

Mosho
  • 7,099
  • 3
  • 34
  • 51