Last Updated: 27 Sep 2022 06:14 by ADMIN
Created on: 26 Sep 2022 11:37
Category: RichTextBox
Type: Feature Request
RichTextBox: Merge undo commands when typing consecutive text
Merge undo commands when typing consecutive text. In Word when typing continuous text (without changing the caret position) it is added as only one undo step. In RichTextBox every keystroke (or multiple keystrokes with less than 15 milliseconds in delay) is added as separate undo steps.
Posted on: 27 Sep 2022 06:14

Hi William,

Changing the 15ms timer will not be a viable solution for two reasons. Number 1: it will still split the input into several undo commands because the timer will eventually run out. Number 2: increasing the timer interval will negatively affect the user experience while typing - nothing will be inserted in the document until the time has elapsed.

I have made several videos demonstrating the default behavior (15ms), when the timer is set to 500ms, and when it is set to 1000ms. In every case, I will start typing by pressing a letter on the keyboard and never letting it go to simulate a constant input.

As a side note, currently, you can still update the timer's interval by using a custom Caret class and setting this in its constructor:

this.MinimumTextInsertedInterval = 500; // The time buffer in milliseconds.

Afterward, to hook the new caret you will need to follow the instruction from this article - How to implement your own IME support? But be wary that, as discussed earlier, this will deteriorate the typing experience.

The correct approach would be to internally merge the two neighboring undo steps of type "Typing" into one when some external requirements are met.

We have already finished the planning process for the current release cycle. I can not promise when this feature will be implemented. So, be sure to subscribe to this item, to receive updates when its status changes.


Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Posted on: 26 Sep 2022 14:15
This may be an easy one to implement since it is already defined at 15ms, meaning if it can be exposed as a property then users can configure it, making the interval longer in the case of users wanting to have a behavior closer to MS Word.