qTip2 / qTip2

qTip2 - Pretty powerful tooltips
MIT License
2k stars 465 forks source link

Hiding a qTip doesn't work if the containing window is not visible at the time #846

Open jfrank14 opened 6 years ago

jfrank14 commented 6 years ago

Here's my situation: I have a form that I show in a jQueryUI popup. I hide and show this popup multiple times, and before I show it, I show and hide the various tooltips on the form. (I'm using the tips for form validation, but that's not really relevant to the problem.)

The problem occurs when a tip was visible when I hid the form, but I need to hide it before showing the form again. I call $(target).qtip("hide"); on that tip, but it's still visible when the form is shown. I think this is because of the following lines in the code:

Line 1015: visible = this.tooltip.is(':visible'),

Line 1036: // If the state hasn't changed or the user stopped it, return early if(!allow || identicalState) { return this; }

The first of these, I think, is using jQuery to check if the tip is visible, and jQuery is reporting that it's not visible because the whole window it's on is not visible. Then the next block of code is not hiding the tooltip because it thinks it's already hidden, but that's only because the visible test is wrong.

I can only work around this by showing the window and then hiding the ones I don't want, but that causes a noticeable flicker.

Is there a better way to address this problem?