Howdy, Stranger!

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

Is this a bug?

We removed Dom element associated with tooltips to release memory issue in IE11, works fine in Chrome btw. Something like Tipped.get(element).remove(); But exception raises later in method _hide in tipped-debug.js. around Line 1920 this._tooltip.fadeTo, because _tooltip is null. Should you add an if null check here? or a null check inside function hide. like this if (this._tooltip !== null) {this._hide(a, b)} ?


  • edited May 2016

    When you call Tipped.remove(element) before removing the actual dom node and call Tipped.hide(element) after, it shouldn't refer to a tooltip. Perhaps you're trying to hide a collection that you've kept in memory? Not sure how you're getting to the hide part after removing the tooltips, how would I replicate this?

  • I looked into it and found a bug in the latest version when using Tipped.get(element).remove();

    Should be fixed in 4.5.7, let me know if that fixes it for you.

  • hi Nick, Thanks for your quick response. The call stack is hideDelayed -> this.hide() ...then exception. I think there is a timeout task started when I remove the element, but when it's time to run hideDelay, tooltip is expected but it's gone. This is old code in our system and I didn't develop that, just a thought. So the bug you are talking about, is it to do with my issue? will be fixed in release 4.5.7? and when will that be? Thanks again.

  • Oh, I can see 4.5.7, so fast. I'll test this.

  • Nick, we are using profession version, when I test 4.5.7, I get errors like Tipped.delegate is not a function. Guess I need to talk to our operation team to get the latest pro version?

  • edited May 2016

    Yes, the pro version has delegation. An error about Tipped.delegate not being a function probably means you're using the light version.

    4.5.7 should fix issues where you're removing tooltips using Tipped.get(element).remove();. I recommend using Tipped.remove(element) instead, that should even work without issues in earlier versions.

  • edited May 2016

    Thanks Nick. I tried 4.5.7 but with some funny errors, guess our code is based on 4.0.10, plus my manager says it's too risky to use the lastest version for a patch build. We'll test 4.5.7 in another major build. So I still need to change tipped-debug.js and tipped.js for 4.0.10. Will add a null check (Tipped.remove(element) doesn't help). Could you let me know which tool you use to generate tipped.js from tipped-debug.js? I can find some online tools like jscompress, just want to double check in case I cause any problem in production. And there is no debug version now anymore?

  • edited May 2016

    Old versions have been packed with packer, the latest versions use uglify.

    I recommend upgrading at some point, seems safer than locking yourself into an old version. A lot of bugs have been fixed since 4.0.10, it's been 2 years.

    You'll run into issues with API changes when upgrading. The changelog cover these upgrades from version to version, but since you're so far behind it might be best to look at the documentation for the correct way to use the current API.

Sign In or Register to comment.