I am trying to put a tooltip on a button link as shown below. The button is in a grid, so I have included the template. It is just an image with font-awesome, so there is no text. Because I am using Angular, the event that needs to be called is an ng-click event.
template:
'<
a
data-toggle
=
"tooltip"
title
=
"Deactivate"
class
=
"btn ct-image-button"
ng-click
=
"$ctrl.changeActivation(dataItem)"
>' +
'<
i
class
=
"fa fa-times-circle fa-lg red-color"
aria-hidden
=
"true"
></
i
>' +
'<
span
class
=
"sr-only"
>Deactivate</
span
>' +
'</
a
>'
I have tried adding the tooltip using the kendo-tooltip attribute on <a>, as well as adding during the component's $onInit method (shown below):
$ctrl.$onInit =
function
() {
var
grid = $(
'#grid'
);
grid.kendoTooltip({
filter:
'[data-toggle="tooltip"][title="Deactivate"]'
,
content:
'Deactivate'
});
};
However, when I hover over the button, either the tooltip appears or the button can be clicked. This prevents users from clicking on the button once the tooltip is shown.
Finally, I have tried adding a <span> around my button with the tooltip on that. This causes a mix of kendo-tooltip and standard tooltip to appear, depending on where my cursor is located.
Is there any way to use the tooltip with a button?