1. 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

Discussion in 'XenForo Questions and Support' started by manbot, Mar 27, 2014.

  1. manbot

    manbot Member

    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.
  2. Valhalla

    Valhalla 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.
  3. Mike

    Mike 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).
    Brad L and Valhalla like this.

Share This Page