angular-tooltips icon indicating copy to clipboard operation
angular-tooltips copied to clipboard

Close Button not Working

Open akashdeepshah opened this issue 9 years ago • 7 comments

Close button is not working when

tooltip-close-button="true"

close button click event does not disappear tooltip.

akashdeepshah avatar Dec 28 '15 07:12 akashdeepshah

Hi @akashdeepshah,

as you can see here we put an usage example of the close button example. Due to the fact that I'm unable to reproduce the issue, could you please provide a jsbin/plunkr/codepen snippet to reproduce the problem?

Thanks, Dario

wouldgo avatar Dec 30 '15 18:12 wouldgo

I have used this in Ionic Project with ng-repeat below is my code

  <div ng-repeat="grp in groupmembers">
          <div tooltips tooltip-template="{{getGlastReadMsg(grp.uid)}}" 
                         tooltip-smart="true"
                         tooltip-show-trigger="click"
                         tooltip-close-button="true"
                         ng-click="ReadGUnreadMsg(grp.uid)" style="margin-right: 35px;">
       <img class="avatar grpimg" ng-src="{{grp.pic}}" style="position:relative" />
    </div>
</div>

akashdeepshah avatar Dec 31 '15 04:12 akashdeepshah

We tried upgrading from 0.1.25 to 1.0.7 and experienced the same issue. The close button simply does not work when clicked. Nothing at all happens.

We also don't see a way to specify the markup used to render the close button. 0.1.25 allowed us to use custom markup -- in our case, a character from FontAwesome -- to use as the close button. There doesn't seem to be any way to configure this under 1.0.x shy of altering the source code.

number61971 avatar Jan 28 '16 21:01 number61971

I'm seeing this as well running 1.0.7 on Mac Chrome 47.0.2526.111

tooltip-close-button="true" places the close button on the tooltip (small x), but the button doesn't do anything.

I added tooltip-hide-trigger="mouseup" and that closes the tooltip on mouseup within the tooltip, which solves the problem, but I'm assuming enabling the close-button was intended to enable that behaviour without adding the hide-trigger.

alignsoft avatar Feb 02 '16 15:02 alignsoft

Same here. Close button doesn't work with version 1.0.7.

The difference is that I'm setting this option as a default config, like this:

tooltipsConfProvider.configure({
    'showTrigger': 'click',
    'closeButton': true,
    'hideTrigger': 'resize'
});

celsomtrindade avatar Mar 23 '16 13:03 celsomtrindade

For me close-button is working fine only if tooltip-template contains only string.

tooltip-template="Simple string" // this works fine

It will not work if there is angular-variable inside tooltip-template

tooltip-template="{{getGlastReadMsg(grp.uid)}}" // this is not working

syam1123 avatar Sep 05 '16 12:09 syam1123

@syam1123 That seems to work. Weird thing is, tooltip-template="{{ :: $ctrl.tooltip }}" works in one file, but in another it doesn't. I add :: so AngularJS doesn't apply binding to the string, so it's not a variable. In the file where the close button doesn't work, pasting the contents of $ctrl.tooltip directly inside the tooltip-template="", works. Weird, but works, and I have a deadline, sooooo.... 😃

jeffhuys avatar Jul 26 '17 08:07 jeffhuys