25

When I press Control+Z in the editor for Ask/Answer question, my last 2 modifications are undone.

What I mean is, that if I press Control+Z, followed by Control+Shift+Z, the text will not be the same as before I pressed Control+Z. I need to press Control+Shift+Z twice, not once, for that.

As an example, if I select and delete all the text, then write some new text, then hit Control+Z, the new text disappears AND the old text reappears.

This might not be obvious at first because changing the cursor position is considered a separate action, so it might look like Control+Z doesn't undo 2 actions, but in reality, it also changes the cursor.

I'm on Google Chrome, but I just tested on Firefox and this happens there too.

6
  • 4
    I'm seeing this behavior too, but is there anything they can do about it? Text boxes are mostly rendered and controlled by the operating system. Not saying they definitely can't change this behavior, but not sure they can. Also not sure if it's desirable -- it appears to be standard behavior. If I open a text pad in a different program (not a web browser), I'm also seeing that behavior.
    – Ben Lee
    Commented Feb 17, 2013 at 1:28
  • 3
    I tried it in the Reply box for some forums, and there Ctrl+Z works normally. So it's not a problem of the browser itself.
    – sashoalm
    Commented Feb 17, 2013 at 13:26
  • 4
    @BenLee This undo is not controlled by the browser / OS.
    – balpha StaffMod
    Commented Feb 19, 2013 at 7:40
  • 5
    I've stumbled across this bug a few times too, it's really annoying. There's some JS interfering with the browser's undo. It's especially annouying if you paste some text and immediately hit Ctrl+Z, a large portion of the text you typed before the paste will also be removed, even if you wait a few seconds between typing and pasting.
    – CodeCaster
    Commented May 22, 2013 at 18:23
  • 3
    I see this as well and found this report when I came here to report the same thing. It's very irritating. Firefox 22.0 on Ubuntu 12.04. I think it would be better to just leave undo up to the browser if possible.
    – Jason C
    Commented Aug 14, 2013 at 4:45
  • 1

2 Answers 2

4

Cross-site duplicating the answer of Stack Overflow Meta Double revert when pressing Ctrl+Z after pasting in an answer field. Pasting something is a forgotten step so that two steps get reverted:

Making another one's comment on that linked Q/A an answer, here is at least a good workaround:

If you run into a double reverting Ctrl+Z, just press Ctrl+Y once and it will be as if Ctrl+Z was done just once.

And whoever reads this and can fix this editor bug of over a decade, please do so.

8

Great question, I had ran into this a few times too.

Basically the editor does not recognize cut as an undoable operation.

So if I CUT something, then press CTRL+Z, it undoes my CUT and one previous operation.

2
  • 2
    Minor correction - this happens for Delete as well as Cut (i.e. pressing Del as opposed to Ctrl+X).
    – sashoalm
    Commented Oct 28, 2013 at 6:20
  • 1
    And paste, as well.
    – wizzwizz4
    Commented Jul 10, 2019 at 17:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .