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.