Closed Noisefever closed 4 years ago
+1
This is very common request. However when the input field steals the focus then the keyboard navigation within the whole app is affected. Input field is automatically focused e.g. when opening or switching rooms but not when switching between riot and other windows.
Then make it configurable, please. Personally I give a shit about keyboard navigation in this case. But on the long-term writing into nowhere, because the textfield is not reliable, is an k.o. critera for using a messenger.
I am sorry but this is very unlikelly to change at least I hope so. No other modern web based chat service disables keyboard navigation the way you are suggesting here. Just for ilustration none of Facebook Messenger, Google Hangouts, Microsoft Skype / Skype for business are consuming all the keypresses. I haven't tested more. Hopefully this is enough for properly describing the situation.
Okay. Probably I'm too oldfashioned for using webchats and their rules.
Just to think about: I don't know the keyboard shortcuts, but if they don't use normal textkeys (without modificators), then you could route any normal key into the textfield. But I guess that's too unconventional too...
I think perhaps the actual question is why does the text input not have the focus, when you want it to have focus? If the field is focused by default, it sounds like you should actively have to do something to make it lose focus, which then causes the original problem.
So rather than asking how to prevent it to lose focus, we should think about why it loses focus in the first place.
edit:
E.g. if I click the create new room button in the sidebar, and then cancel, it does seem somewhat reasonable to me that focus is returned to the text entry field. However, this does make keyboard navigation slightly harder because if you press the wrong button you have to navigate all the way back to the correct one.
Good point! I'll be watching this in more detail in next time. One thing I can definitely say already: after selecting an emoticon (very annoying).
This has been discussed over on https://github.com/vector-im/riot-web/issues/4906, where we shied away from implementing a catch-all "all unhandled keyboard presses land in the composer" for fear of it being something that would be horribly glitchy if implemented without serious consideration for side-effects.
"all unhandled keyboard presses land in the composer"
It now does this
Description
The chat text field should be autofocused. It makes sense in a chat application, that if you type, the text always adds to the standard textfield (except you are in another textfield like search). It happens so often to me that I bring the riot window to front and start typing and the text is going nowhere because the textfield has no focus. That's very frustrating.
That's how Pidgin, ICQ, Trillian or any other chat application I ever used handles it. That's what the default user is expecting, I would say.
Version information
Version of matrix-react-sdk: 0.11.1 Version of riot-web: 0.13.1 Version of olm: 2.2.1