We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Uncaught TypeError: Cannot read property 'close' of undefined

Hi,

I am using  the package v19.1.0.58 with  <script src="https://cdn.syncfusion.com/ej2/dist/ej2.min.js"></script>

I have two new issues using Diagram (see below). I suspect that my version is no longer up to date compared to the js file.

Error1:

ej2.min.js:formatted:145341 Uncaught TypeError: Cannot read property 'close' of undefined

        at e.closeTooltip (ej2.min.js:1)

        at t.e.endAction (ej2.min.js:1)

        at t.e.mouseUp (ej2.min.js:1)

        at t.mouseUp (ej2.min.js:1)

        at e.mouseUp (ej2.min.js:1)

When I open the js file, the error is on the close() function.

   e.prototype.closeTooltip = function() {

            this.diagram.tooltipObject.close()

        }


And the second error:

Uncaught TypeError: Cannot read property 'match' of undefined

    at Object.eval (eval at A (ej2.min.js:1), <anonymous>:21:33)

    at ej2.min.js:1

    at lc (ej2.min.js:1)

    at t.set [as content] (ej2.min.js:1)

    at gc (ej2.min.js:1)

    at t.initAnnotationWrapper (ej2.min.js:1)

    at t.initAnnotations (ej2.min.js:1)

    at t.initNode (ej2.min.js:1)

    at t.initObject (ej2.min.js:1)

    at t.initNodes (ej2.min.js:1)


Can you confirm this is due to the difference of versions between the package and the js file? 

If it is so, how can I have a js file synchronized with the version?


Regards,

Laurent


3 Replies

AM Arunkumar Manoharan Syncfusion Team August 3, 2021 11:15 AM UTC

Hi Laurent,     
on the further analysis of the shared details, we have backtracked using stack trace and tried to find the issue, but we couldn’t be able to find the exact cause for the issue. so kindly provide us more information by a working sample or replication procedure video of your scenario this will help us to serve you better. 

Regards,
Arun.
 



LA Laurent August 3, 2021 12:53 PM UTC

Hi Arun,

Thanks for your answer.

After further investigations, it is a problem due to the use of annotation template with <a rel='nofollow' href...></a> in the template.

It used to work last weeks. When I replace the hyperlink with an input, it works fine. I can deal with that.


I have still a question:

How can I have a js file synchronized with my package version?

when using  <script src="https://cdn.syncfusion.com/ej2/dist/ej2.min.js"></script>, I have the lastest js file.


Regards,

Laurent

 



GG Gowtham Gunashekar Syncfusion Team August 4, 2021 12:47 PM UTC

Hi Laurent, 
 
On the further analysis of the shared details, we understood that you want to use some previous version of the source file. We suggest you use the following script tag instead of the latest script tag.  This script tag is for version 19.2.48 but use can edit your needed version instead of 19.2.48.  

Code snippet: 
 
//Instead of the version you can use your required version. 
<script src=https://cdn.syncfusion.com/ej2/{* version *}/dist/ej2.min.js type="text/javascript"></script> 
 
<script src=https://cdn.syncfusion.com/ej2/19.2.48/dist/ej2.min.js type="text/javascript"></script> 
 
 
 
Regards,    
Gowtham    


Loader.
Up arrow icon