[Project_owners] Manually adding things to the undo pile
enndeakin at sympatico.ca
Tue Oct 14 12:57:16 EDT 2003
mark bokil wrote:
> David Murray wrote:
>> I've got a textbox, all nice and happy, as textboxes usually are.
>> Undo/Redo works fine on it. However, I've got it so that if you press
>> Ctrl+B, it calls a function that adds <b></b> tags around whatever
>> text is selected. It works all fine, except as soon as the function
>> runs, it clears out all the undo memory. It seems that settling
>> textbox.value wipes resets the undo pile.
> This is my experience also. If you change your textbox value it will
> automatically wipe the undo pile. I would be interested if you come up
> with a way to prevent this.
If you change the value of a textbox via a script, it shouldn't be
undoable since there isn't any user text to go back to. The change made
by the script certainly shouldn't be undoable. If it was, I could
imagine all sorts of breakage as users undo things they shouldn't.
More information about the Project_owners