Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Destroy/hide event breaks if event is initialized from inside the qtip. #476

Closed
coppermind opened this Issue · 4 comments

3 participants

Paul Corpuz Craig Michael Thompson Andrés Valor
Paul Corpuz

qTip2 normal behavior is usually that when the selector is removed from the page the qtip popup hides itself. We are trying to use it wherein the element that initializes the reset/hide action for the selector is inside the qtip itself. This breaks the close method and the qtip fails to hide itself.

We are currently employing a workaround by inserting a 'hide' call when the selector is refreshed. eg. $(selector, context).qtip('hide');

Craig Michael Thompson
Owner

Can you please setup a reproducible test case? http://jsfiddle.net/fdavn

Andrés Valor

Hi! Don't know if exactly related to this problem, but sure it has something to do with destroying qTips. I'm using this solution (http://stackoverflow.com/a/13929294/1152186) to get qTip in my error messages on an ASP.NET MVC4 project. This worked flawlesly in version v2.0.1-4-g, but recently I upgraded it to v2.0.1-26- and now it fails on destroying tooltips.

I've done some researching and noticed some clues to point to the recent modifications to the 'destroy' function:

1st: Line 1345
self.destroyed = !(self.rendered = FALSE);

After that, when inner 'process' function runs, the if(self.rendered) code in line 1353 is always false, and the tooltip is not fully destroyed.

2nd: Line 1344
if(self.destroyed) { return; }

In IE is false, but in Chrome is true, so the destroy never is procesed in that browser.

3rd: In my code, I had to force the immediate param to get the process function executed.
else { elem.qtip('destroy', true); }

If not, process function never gets invoked through hide().

I hope this information helps to find a solution. Meanwhile, returning to v2.0.1-20-, which works just fine

Craig Michael Thompson Craga89 closed this in bb0c2f4
Craig Michael Thompson
Owner

Thanks for looking into that farlop, much appreciated! Check out the latest commit for a fix on this

Andrés Valor

Hi! It works fine again! Thank you for so quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.