I have custom tool buttons on my editor, and those buttons paste some text inside the editor on click (using the paste function). I cannot undo or redo these paste operations. If I manually type some thing, then undo and redo works on that, but not on the pasted text.
What would be a good solution to this?
Thank you in advance,
Nisarg Patel
9 Answers, 1 is accepted
Hello Nisarg,
Indeed, the paste method did not enter the undo/redo stack -- this bug has been fixed for the next internal build, which should be out by the end of the week.
Regards,Alex Gyoshev
Telerik
Seems it still doesn't work.
When I paste some text to editor and call Undo (via browser menu, or CTRL+Z shortcut) it doesn't remove pasted text. Instead this it try to remove previous manually typed text in editor.
Tested in Chrome 51 and Firefox 47 on your demo page:
http://demos.telerik.com/kendo-ui/editor/index
Hello David,
It appears to be working on our side. Can you please post the exact steps you perform in the demo?
Regards,Alex Gyoshev
Telerik
Watch this video:
http://sendvid.com/a5f1jhtj
Hello David,
Thank you for the recorded video. The problem is caused by the use of the the browser context menu -- its undo does not go through the editor undo / redo stack. I have logged this for further investigation. At this time, you can use Ctrl+Z for undo and Ctrl+Y for redo.
Regards,Alex Gyoshev
Telerik
Hello Alex,
problem is not caused by using browser context menu. I use this method only in video for better clarity when I call undo command.
Same results, when I use shortcut CTRL+Z or browser menu (Edit -> Undo) or right click context menu as you can see in video.
Set focus on Editor doesn't help too.
I think that pasted text is not inserted in Editor history stack. Instead, there is only empty "nothing-do" history step.
Hello David,
I could not reproduce the problem when using Ctrl+Z -- with the same steps, retraced. Is there anything different when using Ctrl+Z?
Regards,Alex Gyoshev
Telerik
Hello Alex,
I do some test with colleagues. Problem occurs only on Mac users with Chrome or Firefox. For Linux and Windows users undo command works fine.
Can you reproduce problem on Mac with OS X El Capitan?
It appears that the undo / redo functionality is currently triggered by Ctrl+Z / Y, which is not intuitive for Mac OS users, who are accustomed to Cmd + Z / Y. Apart from that, I'm afraid that we could not reproduce the issue in the latest demos, using Chrome and Firefox on Mac OS.
Regards,
Alex Gyoshev
Telerik