UX: ensures esc key is correctly working when in dates form (PR #9299)

1 esc close modal focus date button in toolbar 2 esc reduces composer

GitHub

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/esc-in-composer-close-the-wrong-thing/144117/5