FluidFramework icon indicating copy to clipboard operation
FluidFramework copied to clipboard

Undo issue for text deletion in SharedString

Open ZeguangWu opened this issue 4 years ago • 1 comments

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);
});

AB#27

ZeguangWu avatar Jan 06 '22 19:01 ZeguangWu

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!

ghost avatar Dec 12 '22 03:12 ghost