Collabora Calc inserts content from a previously edited cell while editing

The problem only occurs with three specific Calc documents. All other Calc files in the same environment work without any issues.

The issue already existed before updating and still occurs after updating our Nextcloud AIO installation yesterday. All containers are running the latest available versions.

Environment

  • Latest Nextcloud AIO release
  • All containers updated yesterday
  • Latest available versions of Nextcloud, Nextcloud Office (richdocuments) and Collabora Online/CODE

Affected documents

The affected files:

  • are very small (only a few KB),
  • mainly contain text,
  • contain many sheets/tabs,
  • have no special formatting.

The issue occurs regardless of whether users are working from the office or from home, and it affects multiple users.

Observed issues

Issue 1: Cell contents change unexpectedly while editing

A typical sequence is as follows:

  1. A user edits the text in a cell.
  2. During editing, they notice a mistake in the existing text.
  3. They try to place the cursor at the position where the correction should be made.
  4. Quite often, the cursor cannot be placed at the desired position. Only after clicking several different positions within the text does it finally move to the correct location.
  5. As soon as the user types the next character, unexpected changes occur:
    • content from a previously edited cell suddenly appears in the current cell,
    • in some cases the inserted content even comes from a different sheet/tab,
    • parts of the current cell content disappear,
    • or older content of the same cell reappears.

During later review of the document, we have noticed that some entries are simply missing.

The problem occurs during editing, before the cell is saved.

Saving frequently or after every editing step does not prevent the problem.

Issue 2: “Delete Contents” dialog blocks editing

We also observe another issue in the same three documents:

  1. While editing a cell, the “Delete Contents” dialog appears unexpectedly.
  2. The dialog cannot be closed.
  3. Editing cannot continue until the document is closed and reopened.

This issue also occurs only in these three documents.

Additional observations

  • The issue is not related to the length of the text. It occurs with both short and long text entries.
  • Multiple users have independently observed that the cursor placement issue and the unexpected insertion of content from a previously edited cell seem to be related.
  • Editing via the input/formula bar at the top usually works correctly. The issue mainly occurs when editing directly inside the cell.
  • Since these documents contain many longer text entries, using only the input bar is not a practical workaround.
  • It appears that Collabora does not correctly reset the editing state of the previously edited cell and reuses it when editing the next cell.

What we have already tested

  • Updated to the latest Nextcloud AIO release yesterday (issue still persists)
  • All containers are running the latest available versions
  • Different browsers (same behavior)
  • Different locations (office and home office)
  • Multiple different users
  • Files are only a few KB in size
  • No special formatting
  • No complex formulas
  • Saving as both ODS and XLSX (no improvement)
  • Saving after every editing step (no improvement)

Question

Has anyone seen this behavior before, or is there already a known issue or bug report for Collabora Online or Nextcloud Office?

If required, we can provide additional information, log files, or an anonymized sample document that reproduces the issue.

Update – Collabora version / further investigation

I have now checked the Collabora Online version running in the Nextcloud AIO container.

The installed version is:

Collabora Online / coolwsd 26.04.1.4

This was confirmed with:

docker exec nextcloud-aio-collabora coolwsd --version

Interestingly, the command also reports the following error during initialization:

Failed to initialize COOLWSD:
filesystem error: cannot create directories: Permission denied
[/usr/bin/jails/.../systmp]

The coolconfig --version command is not supported by this version of Collabora, so coolwsd --version was used to determine the version.

I do not yet know whether the /usr/bin/jails permission error is related to the Calc issue described above. I therefore do not want to assume a connection at this point.

The original problem itself remains unchanged:

  • content from previously edited cells can unexpectedly appear in the current cell;
  • content can even come from a different sheet;
  • parts of the current cell content may disappear or older content may reappear;
  • the problem mainly occurs when editing directly inside the cell;
  • editing through the formula/input bar generally works correctly;
  • the issue is reproducible with the same three documents and affects multiple users.

I will investigate the /usr/bin/jails permission issue separately and provide further information if there is evidence that it is related to the Calc editing problem.

If anyone has seen similar behaviour with Collabora Online 26.04.1.4, especially regarding the editing state/cursor position being retained from a previously edited cell, any information would be appreciated.

Update – reproducible editing problem in affected documents

We have now received another report from a user working with one of the affected documents, and the behaviour appears to be even more clearly related to the Calc cell editing state.

A typical incident was observed at approximately 10:45:

  • While editing the text of a cell, the user encountered the “Delete Contents” dialog unexpectedly.
  • The dialog could not be closed normally.
  • After closing and reopening the document, editing was possible again.

At approximately 10:55, while editing another cell in the same document:

  • the user entered text normally;
  • the text in the cell then unexpectedly appeared twice;
  • the duplicated text initially could not be deleted;
  • after repeatedly clicking/selecting the text and pressing Delete, it could finally be removed;
  • part of the text that had originally been entered by the user was missing afterwards.

This is consistent with the behaviour already described in the original report:

  • the text cursor often cannot initially be positioned correctly inside a cell;
  • after clicking several times, the cursor eventually appears at the intended position;
  • typing the next character can cause content from a previously edited cell to reappear;
  • in some cases the content appears to come from another sheet;
  • parts of the current cell content can disappear or older content can reappear;
  • editing through the formula/input bar generally works correctly;
  • direct editing inside the cell is where the problem mainly occurs.

The problem is reproducible in the same three documents and affects multiple independent users.

We are currently testing whether rebuilding the affected documents from plain cell contents into completely new Calc files eliminates the problem. This should help determine whether the problem is related to the internal structure/state of the documents.

Our current Collabora version is:

coolwsd 26.04.1.4

We also noticed that CODE 26.04.2.1 has since been released. We will check whether our Nextcloud AIO installation can be updated to that version and whether the problem remains.

Question

Does this behaviour correspond to any known Calc bug involving:

  • the text cursor/editing state of a cell,
  • stale editing state from a previously edited cell,
  • switching between sheets while editing,
  • or incorrect reuse of the previous cell’s text/edit buffer?

The combination of incorrect cursor positioning, old cell contents reappearing, duplicated text and the “Delete Contents” dialog appearing during editing makes us suspect that the client-side Calc editing state is not being reset correctly.

We can provide:

  • anonymized affected documents,
  • Collabora logs covering an exact incident,
  • browser console logs,
  • and a minimal document if we can reproduce the problem after reconstructing the file.

Any guidance on which additional debugging information would be most useful would be appreciated.