Skip to content

Commit

Permalink
Add TODO around TrivialUndoManager bug
Browse files Browse the repository at this point in the history
  • Loading branch information
peitschie authored and Friedrich W. H. Kossebau committed Jun 1, 2015
1 parent bff40e6 commit e6cb301
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions webodf/lib/gui/TrivialUndoManager.js
Expand Up @@ -387,6 +387,8 @@ gui.TrivialUndoManager = function TrivialUndoManager(defaultRules) {
completeCurrentUndoState();
// We just threw away the cursors in the snapshot, so need to recover all these operations so the
// cursor can be re-inserted when an undo is performed
// TODO the last move state may not reflect a valid position in the document!!!
// E.g., add cursor, move to end, delete all content + saveInitialState
currentUndoStateTransition = initialStateTransition = extractCursorStates([initialStateTransition].concat(undoStateTransitions));
undoStateTransitions.length = 0;
redoStateTransitions.length = 0;
Expand Down

0 comments on commit e6cb301

Please sign in to comment.