GrisJS crash when disabling freeze pane for two spreadsheets

We use gridjs-spreadsheet to display two Excel files side-by-side. We have a button that allows the user to disable freeze panes for each of the viewers individually.

When the user disables freeze panes for both spreadsheets, we get a “DomException: Failed to execute ‘removeChild’ on ‘Node’: The node to be removed is not a child of this node.”

I’ve noticed related errors on the Aspose Cells Compare viewer when comparing two spreadsheets with freeze panes:

Uncaught ReferenceError: imageDivEl1 is not defined
    at h (grid-compare.min.23.9.0.0.js:1:3242)
    at grid-compare.min.23.9.0.0.js:1:3057
    at HTMLDivElement.<anonymous> (xspreadsheet.23.9.0.0.js:12:1738)

This also causes some images to fail to load:

image.png (130.5 KB)

From what I can tell of the minified code, gridjs-spreadsheet is doing getElementById, however the IDs used (tr, tl, br, bl) are not unique because there are two spreadsheets.

For reference, this is the file I used to reproduce the above errors: 210914_Sustainability and ESG Navigators and Databook 2021.xlsx.zip (613.3 KB)

@jrf.att
we will try to reproduce this issue

@jrf.att
We have reproduced the issue and will work to fix it as soon as possible.

@jrf.att
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSGRIDJS-906

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@jrf.att
please get the latest js v23.9.2

your issue shall be fixed

Hey @peter.zhou, just tried 23.9.2 for this and the other issues I’d reported. Those issues are fixed, but I am seeing a new issue related to text boxes.

Previously, in “read” mode, the text box was not able to be selected. It seems like that behaviour has been changed for Accessing additional sheets in GridJS - #42 by peter.zhou. There are two main issues:

First, when selecting a text box to go into text-select mode, all of the text in the box moves. This appears to be caused by replacing the image in the textbox with actual HTML. It’s not a huge issue, but it is a bit jarring for large textboxes because the text can end up moving quite a lot.

Second, and the bigger issue, is that scrolling while in the editor mode seems to lead to duplicated/misplaced content (see how the editor box is duplicated on the right):

image.jpg (517.5 KB)

This is the file I used to reproduce the issues: 2022-sustainability-data-pack.xlsx.zip (1012.8 KB). I tried to reproduce them on the public Aspose Viewer, however neither the main nor the QA one seem to be working currently (CORS error logged in the console).This text will be hidden

@jrf.att,

Thank you for the feedback. We will look into those new issues.

@jrf.att
It seems ok on my end. Regarding the first issue, it’s difficult to keep the rendering the same as the actual HTML. As for the second issue, please check the QA file below.
https://products-qa.aspose.app/cells/editor/edit?FolderName=ec969ba7-9752-4f3f-aee9-c5abcab647db&FileName=2022-sustainability-data-pack.xlsx&Uid=13727497-4684-4a00-ab74-190af7ce074c.xlsx
it seems ok.

QQ截图20231003113616.png (73.8 KB)

also in my local side, I have the below snapshot

QQ截图20231003113103.png (64.4 KB)
use v23.9.2 client js.
what is your dpi?

Thanks @peter.zhou. The QA Viewer site is working for me again, but I can’t reproduce the error there, so it must be something in my code. I’ll investigate further and get back to you if I find something more.

@jrf.att
You are welcome. If you have any questions, please feel free to contact us.

The issues you have found earlier (filed as CELLSGRIDJS-906) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi

Hi @peter.zhou, I was able to reproduce the issue on the Aspose viewer using the following file:

2022-sustainability-data-pack EDITS.xlsx.zip (1013.3 KB)

It wasn’t reproducing on the original file because the Home sheet is locked, so editing is entirely disabled. The new spreadsheet has a textbox at the bottom of the Financial Health sheet. If you select the text box then scroll, the editor gets moved either to the top of the page or to the right, as seen in the screenshot above.

How can we prevent the text boxes from being editable? We have mode: 'read' but that doesn’t seem to work for this case.

@jrf.att
When you select the textbox control, you can select the text content inside it and it is readonly
in mode: 'read' .
However we can reproduce this issue by following the steps you described .
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes soon.
Issue ID(s): CELLSGRIDJS-938

@jrf.att
Please update the client js to the v23.10.3 from npmjs

the issue shall be fixed.

Thanks @peter.zhou, confirmed that 23.10.3 no longer has the issue.

Is there any way to completely prevent gridjs-spreadsheet from going into edit mode for text boxes? We have no need for allowing text selection, and would prefer if the text boxes stayed in non-edit mode, so that the text doesn’t move around.

@jrf.att
We will add option: AllowSelectTextInTextBoxInReadMode,the default value is false.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSGRIDJS-940

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@jrf.att
we now add new load option :AllowSelectTextInTextBoxInReadMode, the default value is false.

please update to the latest v23.10.4 client js

as the default value is false, you just need to update the js.
then select the textbox will trigger select the text content inside the textbox control will not happen.

The issues you have found earlier (filed as CELLSGRIDJS-940,CELLSGRIDJS-938) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi