Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] collaborative: recompute selection after concurrent sheet modif…
…ications See newly added test to see the steps to reproduce the issue. Issue Summary: - When Charlie applies his local revision, his active sheet correctly updates to `Sheet2`, as it is the only visible sheet. - Upon applying Bob's revision, Charlie's revision is initially rejected due to `allowDispatch`, since only **one** sheet remains. As a result, his active sheet switches back to `Sheet1` in the `dispatchToHandlers` step of the `remote-revision-received` event. - When Alice's revision is applied, Charlie's revision can now be accepted, as there are multiple sheets again. However, Charlie's active sheet remains `Sheet1`, and the selection plugin only detects Alice's `CREATE_SHEET` command, without acknowledging that Charlie's deletion was eventually applied. This results in a crash in the selection plugin, as `Sheet1` does not exist anymore. To fix this, we need to ensure that the `activeSheet` exists in the `finalize`. closes #5692 Task: 4559104 X-original-commit: d1e311f Signed-off-by: Rémi Rahir (rar) <[email protected]> Signed-off-by: Pierre Rousseau (pro) <[email protected]> Co-authored-by: Lucas Lefèvre <[email protected]> Co-authored-by: Pierre Rousseau <[email protected]>
- Loading branch information