Expected Behavior
When a text change is undone or redone, the selection should stay where the caret is so that subsequent text insertions originate from the caret position.
Actual Behavior
When a text change is undone or redone, the selection jumps to the end of the document (from what I can tell, neither caretPosition nor anchor are affected). Subsequent text insertions (if the caret is not manually moved in the meantime) place new text at the end rather than at the caret position.
Note that, from what I can tell, this only occurs on text changes, not style changes.
Reproducible Demo
Occurs as-is in the latest version (revision c9a002b) of the RichTextDemo.
Steps:
- Open the RichTextDemo
- Write some text, preferably with multiple paragraphs
- Change some text in a position that is not the end (removing or adding characters both works)
- Undo the change
- Type another character
- The new character is inserted at the very end of the document
Might be related to #780 / #785.
Expected Behavior
When a text change is undone or redone, the
selectionshould stay where the caret is so that subsequent text insertions originate from the caret position.Actual Behavior
When a text change is undone or redone, the
selectionjumps to the end of the document (from what I can tell, neithercaretPositionnoranchorare affected). Subsequent text insertions (if the caret is not manually moved in the meantime) place new text at the end rather than at the caret position.Note that, from what I can tell, this only occurs on text changes, not style changes.
Reproducible Demo
Occurs as-is in the latest version (revision c9a002b) of the RichTextDemo.
Steps:
Might be related to #780 / #785.