Bug: Error on mouse event if fromJSON() called while painting suspended

Posted by: jb9244 on 10 October 2017, 8:47 am EST

  • Posted 10 October 2017, 8:47 am EST

    SpreadJS 10.2.0 - 10.2.3

    10.1.0 is not affected

    The following code will generate JS errors (“h.IR is not a function”) when mouse events (mouseover, etc) trigger on the document:

    var ss_data = {"version":"10.2.3","sheets":{"Sheet1":{"name":"Sheet1","data":{"defaultDataNode":{"style":{"themeFont":"Body"}}},"rowHeaderData":{"defaultDataNode":{"style":{"themeFont":"Body"}}},"colHeaderData":{"defaultDataNode":{"style":{"themeFont":"Body"}}},"selections":{"0":{"row":0,"rowCount":1,"col":0,"colCount":1},"length":1},"theme":"Office","index":0}}};          spread = new GC.Spread.Sheets.Workbook(document.getElementById("spreadSheet"));
    spread.suspendPaint();
    spread.fromJSON(ss_data);
    
    

    Note that this does not occur if spread.resumePaint() is called immediately after spread.fromJSON(). Our application would call spread.resumePaint() via a setTimeout() for post processing and performance reasons. After upgrading to 10.2.0 we started noticing this error. We have since refactored our workbook loader to no longer employ setTimeout() in order to avoid the issue, but thought it’d be good to document the problem.

  • Posted 12 October 2017, 12:24 pm EST

    Hello,

    I am able to replicate this issue, I have informed the developer about this. I will let you know as soon as I hear anything on this.

    The tracking id for this issue is :247296

    Thanks,

    Deepak Sharma

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels