Need a special offer?Find out if your project fits.
+

Export to CSV/Excel for Chart - Infinite loop

Resolved
Maya Shavin asked on January 31, 2017

Demo: http://jsfiddle.net/nz3zarh5/1/
There is a bug in the loop of checking if the table height is > 0 in the below code (flexmonster.js)
if (0 < c) {
for (;c < this.coords.In;) {
g = this.coords.Ir(h);
t = (e = this.grid.getCell(g, 0, !0)) && !e.Me && 0 == e.level ? '<tr class="fm-first-level">' : "<tr>";
this.showHeaders && (t += this.DM(g));
for (e = 0;e < this.coords.Tc;e++) {
r = this.coords.vn(e), t += this.mE(g, r);
}
t += "</tr>";
this.n.append(t);
this.coords.kd++;
h++;
c = this.n.height();
}
}
I think the assumption is that if the grid is hidden (table is not in view), its height is 0 and so it will never enter this loop. However, in case that the table has height set 100% in css (which will happens in a lot of cases of css customization) - the height will be 100 every time we ask for the height, and it will run in infinite loop and browser crashes.
It is critical bug. Please fix it.

2 answers

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster February 3, 2017

Hello Maya,
Thank you for reporting this issue. We will be ready with the fix in the version 2.310 ETA Feb27.
Best regards,
Dmytro.

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster February 28, 2017

Hello Maya,
I am glad to inform you that the minor release 2.310 is available for download now. Your fix for Excel exporting is ready. You are welcome to update the component.
Kind regards,
Dmytro.

Please login or Register to Submit Answer