• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.3 Editor undo/redo not working as expected

I'm curious about the behaviour of undo/redo in the editor and whether it can be improved.

Undoing text insertion seems OK: it removes the last inserted line and redo will then add back that line. However, undoing deletions doesn't seem to work at all. If you add then delete some text, undo won't do anything.

I'm not sure I fully understand how undo and redo are actually working but it seems to me that undo is actually just removing the last line you've added and redo is adding back that line, regardless of what text operation you've actually last performed.

Is there any way to improve this so that it works as undo/redo is usually expected to (i.e. rollback or redo the last edit operation?). I'm not sure how it used to work, but one of our forum users says that the behaviour got worse when we recently upgraded from 1.1 to 1.3.


Well-known member
Yes, I have noticed similar behaviour.

I think the order of the problem, for me, is something like: paste into editor, type, action an undo (using keyboard shortcut), try to paste something into the editor again. It is that last step that does not work.

I am only remembering that from memory though - will check more fully shortly.


XenForo developer
Staff member
There are probably some improvements that can be made here. It does actually undo/redo, but the trick is determining what's an event that requires an undo state entry (otherwise you'd be storing a state for every character).