Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Tipped.refresh() seems to have timing issues

When a user clicks inside a tooltip, this may cause the tip to get larger.

I have tried calling Tipped.refresh('#tip'); and also Tipped.refresh(); at the end of the javascript function that adds the content to the tip, but the tip doesn't refresh (and resize) - although I can see a little bit of the (clipped) new content at the bottom of the existing tip.

However, when I click inside my tip and then type Tipped.refreshinto the console in my browser, the tip refreshes and resizes as expected.

I also tried

Tipped.hide("#tip");
Tipped.show("#tip");

but this doesn't work - although they do when I manually enter them into the browser console.

My current work around is this:

Tipped.hide("#tip");
setTimeout(function() {
  Tipped.show("#tip");
}, 0);

which has a fake timeout in it and seems to work OK - but I am pretty sure this is not normal or expected behaviour.

I should point out that I am using the tips in a slight non-standard way. They are being opened not with mouse over (as per normal) but by clicking on different links, and I am actually using the tips more like dialog boxes to get user input than for just the straight display of information. However, the fact that I can get the desired behaviour from the console tells me that there is probably something else awry here...

I am using a licensed version of Tipped.js, version 4.6.0.

Suggestions?

Sign In or Register to comment.