Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(v4 and v5) Deleting a Column with Merged Cells Breaks Table #1725

Open
john-pavlat opened this issue Jan 16, 2025 · 0 comments
Open

(v4 and v5) Deleting a Column with Merged Cells Breaks Table #1725

john-pavlat opened this issue Jan 16, 2025 · 0 comments

Comments

@john-pavlat
Copy link

Steps to reproduce:

  1. On a page with Jspreadsheet (for example, the following documentation pages for v4 or v5), open a browser console, then click any cell in the spreadsheet so that the jspreadsheet.current command works properly.
  2. In the console, enter the command jspreadsheet.current.setMerge('B2',1,2).
  3. Right click the column merged ('B" in the example given) and click "Delete selected columns."
    • This can also impact multi-column cell merges, but the process is more complex: it only breaks on the rightmost column of a merge, and right-clicking it will usually also select any other columns involved in the merge, resulting in a "This will destroy any existing merged cells" screen making the issue irrelevant. To get around this, the first row (i.e. row 1) must not be part of the merge; that way, one can click the cell directly below the column, then right-click the column itself and delete the column from there.

This shifts several columns left from the first row to the point where the merge had ended; however, the other ones below it don't seem to move, leaving the table broken. The console gives the error, Uncaught TypeError: can't access property "removeChild", followed in v4 by obj.records[d][l].parentNode is null and in v5 by l.records[t][n].element.parentNode is null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant