# Ctrl+Z does not undo my previous step

**URL:** https://meta.discourse.org/t/ctrl-z-does-not-undo-my-previous-step/23507
**Category:** Feature
**Created:** [December 29, 2014, 4:13pm UTC](https://meta.discourse.org/t/ctrl-z-does-not-undo-my-previous-step/23507 "2014-12-29T16:13:06Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![wuchong](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wuchong/32/115554_2.png) [@wuchong](https://meta.discourse.org/u/wuchong)
#### Post date: [December 29, 2014, 4:13pm UTC](https://meta.discourse.org/t/ctrl-z-does-not-undo-my-previous-step/23507/1 "2014-12-29T16:13:07Z")

</div>

When I type something in the textarea , and select all, and ctrl+b ,and ctrl+z.

I just want to undo my ctrl+b step, however it completely my textarea. I have to type the content again.

It is weird the ctrl+z means clearing textarea instead of undo.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [December 29, 2014, 5:27pm UTC](https://meta.discourse.org/t/ctrl-z-does-not-undo-my-previous-step/23507/2 "2014-12-29T17:27:25Z")

</div>

This is 100% browser and OS specific, we do not override the default browser text box handling of these keys. You can experiment here:

Take [http://codepen.io/anon/pen/uryJl](http://codepen.io/anon/pen/uryJl) which contains a plain html text box.

In different web browsers, type in

> test line one  
> test line two  
> test line three

And then try ctrl+z.

Depends on the browser and whether you naturally pause or not when typing. Play with it and see.

---

<div class="post-metadata">

### Author: ![thangngoc89](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thangngoc89/32/115436_2.png) [@thangngoc89](https://meta.discourse.org/u/thangngoc89)
#### Post date: [December 29, 2014, 6:21pm UTC](https://meta.discourse.org/t/ctrl-z-does-not-undo-my-previous-step/23507/3 "2014-12-29T18:21:43Z")

</div>

Combo Ctrl + Z does work. But if you apply click on any button on composer’s toolbar (or call it via combo key), it doesn’t work.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [December 29, 2014, 6:32pm UTC](https://meta.discourse.org/t/ctrl-z-does-not-undo-my-previous-step/23507/4 "2014-12-29T18:32:01Z")

</div>

Press ctrl+y to redo the undo if that is the case. You do not have to re type the content…

---

<div class="post-metadata">

### Author: ![JSey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jsey/32/3540_2.png) [@JSey](https://meta.discourse.org/u/JSey)
#### Post date: [December 29, 2014, 7:22pm UTC](https://meta.discourse.org/t/ctrl-z-does-not-undo-my-previous-step/23507/5 "2014-12-29T19:22:18Z")

</div>

I think what they want to say is that the editor does not distinguish between typed user input and editor actions like Ctrl-B, Ctrl-R etc. The browser interprets all this as input and if you say “undo”, it does that: it undos all user input, including typed text and Ctrl-keypresses. This, however, is general behaviour of browsers - any browser-based web app behaves this way.

The only solution I see here would be to integrate the undo functionality into the Discourse editor - but this seems like a huge piece of work for a very limited effect - I personally never missed this, neither in Discourse, nor in other forum software…

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [December 29, 2014, 7:45pm UTC](https://meta.discourse.org/t/ctrl-z-does-not-undo-my-previous-step/23507/6 "2014-12-29T19:45:26Z")

</div>

We used to do that, and it just cause a lot of pain and confusion.

---

<div class="post-metadata">

### Author: ![uwe\_keim](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/uwe_keim/32/326762_2.png) [@uwe\_keim](https://meta.discourse.org/u/uwe_keim)
#### Post date: [April 17, 2015, 7:31pm UTC](https://meta.discourse.org/t/ctrl-z-does-not-undo-my-previous-step/23507/7 "2015-04-17T19:31:42Z")

</div>

Just installed the latest upgrade that fixes “[Keyboard shortcuts not working anymore](https://meta.discourse.org/t/keyboard-shortcuts-not-working-anymore/27677)”.

Now it behaves like this:

- When I press Ctrl+B it makes the selected text bold.
- When I press Ctrl+Z (undo) nothing happens. I.e. the bold text stays bold.

Is this the correct/expected behaviour?

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [April 17, 2015, 7:33pm UTC](https://meta.discourse.org/t/ctrl-z-does-not-undo-my-previous-step/23507/8 "2015-04-17T19:33:03Z")

</div>

> [@uwe\_keim](#):
>
> Is this the correct/expected behaviour?

Yes, bolding works but undo is disabled.

---

<div class="post-metadata">

### Author: ![chapoi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapoi/32/537252_2.png) [@chapoi](https://meta.discourse.org/u/chapoi)
#### Post date: [December 4, 2025, 11:33am UTC](https://meta.discourse.org/t/ctrl-z-does-not-undo-my-previous-step/23507/9 "2025-12-04T11:33:26Z")

</div>


