Tooltip not disappearing after button has been removed

Hi,

Is it possible to have the tooltip disappear when the button has been removed?

I am going to have users this will require tooltips to basically spell out what each button does, but this has caused a problem when the button removes a row from a table.

image
image

Thanks,
Ray.

Maybe you can try adding a static event on click to the element having the tooltip:
$(this).tooltip('hide')

2 Likes

Hi Teodor. That worked as you suggested. This will be going onto my Wappler cheat sheet.

Thanks,
Ray

1 Like

Not working with me

http://webcrea.be/tooltip.html

@vdweyer, Try setting your tooltip trigger to hover and set the click on static not dynamic.

image

I did. I signed this problem already in oct '19

@vdweyer
Seems like the default value of the trigger option is 'hover focus' and not just hover that’s why you are experiencing this issue.
@patrick will check this, so we can improve it in the next update.

Meanwhile as a temporary fix, you can open the dmxAppConnect/dmxBootstrap4Tootltips/dmxBootstrap4Tootltips.js and change:

$(function () {
  $('body').tooltip({
    selector: '[tooltip-title]',
    title: function () {
      var expression = this.getAttribute('dmx-bs-tooltip') || '';
      return dmx.parse(expression) || this.getAttribute('tooltip-title') || '';
    }
  });
});

to

$(function () {
  $('body').tooltip({
    selector: '[tooltip-title]',
    trigger: 'hover',
    title: function () {
      var expression = this.getAttribute('dmx-bs-tooltip') || '';
      return dmx.parse(expression) || this.getAttribute('tooltip-title') || '';
    }
  });
});

this will set all your tooltips will be triggered only on hover and not also on focus.

Thank you. This fixes the job.

I read about this ‘hover focus’ default value in several forums but the fixes they sugested did not work.

1 Like

I have this situation, using $(this).tooltip('hide') on click static event solves problem, but I wonder if this is an issue or we have to always use this static event in tooltips on every project?