Escape key when writing on the chat: unfocus the input instead of closing the chat?

AI-generated summary

A discussion has been started about the functionality of the escape key when writing in the chat. Canapin proposed that pressing esc should unfocus the input instead of closing the chat, unless the input is empty or not focused. This idea was sparked by an instance where Canapin lost a message they were writing after accidentally pressing esc. Lilly shared a similar experience, where they also lost their message after pressing esc to focus on their desktop. joffreyjaffeux has addressed the issue and created a pull request on GitHub (https://github.com/discourse/discourse/pull/21772), which joffreyjaffeux later confirmed should resolve the problem. Canapin expressed appreciation for the swift resolution.

I was writing or editing a message in the chat.

I wanted to do something else, and I pressed escape without even thinking, expecting it would unfocus the input.
Instead, it closed the chat, and I didn’t even remember in which personal chat or channel I was writing or editing my message.

I propose that pressing esc would unfocus the input, and would close the chat only if the input isn’t focused or empty.


If we open the post composer, if we press esc while the content is empty, it closes the composer.
If we press esc, it minimizes the composer, leaving it still noticeable and available to continue writing.

So maybe having some sort of similiar behavior on the chat could be nice?

2 Likes

this happened to me as well a few days ago. i escaped to focus on desktop but i did not expect the chat to close.

1 Like

I will have a look :+1:

2 Likes

That should do it

https://github.com/discourse/discourse/pull/21772

Thanks :+1:

2 Likes

Fast and efficient, as all cats with collars & ties should be. :clap:

real picture of Joffrey at work


Midjourney, what else?

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.