# \<ESC\> in composer close the wrong thing

**URL:** https://meta.discourse.org/t/esc-in-composer-close-the-wrong-thing/144117
**Category:** Bug
**Created:** [March 12, 2020, 9:08pm UTC](https://meta.discourse.org/t/esc-in-composer-close-the-wrong-thing/144117 "2020-03-12T21:08:49Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![tdelmas](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@tdelmas](https://meta.discourse.org/u/tdelmas)
#### Post date: [March 12, 2020, 9:08pm UTC](https://meta.discourse.org/t/esc-in-composer-close-the-wrong-thing/144117/1 "2020-03-12T21:08:49Z")

</div>

When new topic/answer composer is open, if you click on “Insert date / time” ![image](https://global.discourse-cdn.com/meta/original/3X/b/e/be3f68b3334db54f10e34bc6fb3a2da2bd75743d.png) and press Esc, it minimized the composer instead of closing the “Insert date / time” modal (a second press to Esc do close the modal)

It’s odd and unexpected (but not serious). As a side note, it works with the “upload” modal for example.

(Just in case it browser related: Firefox 73.0.1 64 bits on Windows 10)

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [March 12, 2020, 9:11pm UTC](https://meta.discourse.org/t/esc-in-composer-close-the-wrong-thing/144117/2 "2020-03-12T21:11:56Z")

</div>

When the modals opens, focus keeps on insert date/time for some reason. This is why esc impacts the composer before the modal.

I will have a look at this.

---

<div class="post-metadata">

### Author: ![tdelmas](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@tdelmas](https://meta.discourse.org/u/tdelmas)
#### Post date: [March 12, 2020, 9:25pm UTC](https://meta.discourse.org/t/esc-in-composer-close-the-wrong-thing/144117/4 "2020-03-12T21:25:25Z")

</div>

Make sense. (for the story, I wanted to open the “Emoji” thing but misclicked on the date instead! Esc to cancel my mistake…)

Thank you for your time!

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [March 28, 2020, 6:07pm UTC](https://meta.discourse.org/t/esc-in-composer-close-the-wrong-thing/144117/5 "2020-03-28T18:07:10Z")

</div>

Will be fixed by:

[https://github.com/discourse/discourse/pull/9299](https://github.com/discourse/discourse/pull/9299)

Thanks

---

<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: [March 29, 2020, 3:08am UTC](https://meta.discourse.org/t/esc-in-composer-close-the-wrong-thing/144117/6 "2020-03-29T03:08:47Z")

</div>


