FluidFramework
FluidFramework copied to clipboard
Undo issue for text deletion in SharedString
Describe the bug
Here is a test case which repros the issue. Copy following code into '.\git\FluidFramework\packages\framework\undo-redo\src\test\sequenceHandler.spec.ts'
it("Undo and Redo Delete - Bug Repro", () => {
insertTextAsChunks(sharedString);
const handler = new SharedSegmentSequenceUndoRedoHandler(undoRedoStack);
handler.attachSequence(sharedString);
sharedString.removeText(1, 2);
sharedString.insertText(5, "a");
sharedString.removeText(0, 1);
sharedString.insertText(5, "b");
sharedString.removeText(0, 1);
while (undoRedoStack.undoOperation()) { }
assert.equal(sharedString.getText(), text);
});
This issue has been automatically marked as stale because it has had no activity for 180 days. It will be closed if no further activity occurs within 8 days of this comment. Thank you for your contributions to Fluid Framework!