mikotoIO/mikoto

[MIK-15] Pressing any key should focus the chat UI and type into it

Closed this issue · 6 comments

Great to hear that progress is being made. If you want accountability, post daily updates here

Surprisingly more difficult than first expected, accounting for things like:

  • different locales (CJKV text)
  • Copy/paste
  • Special inputs, like backspace

still, very much doable

Putting this on hold for a while until the rest of the UX is figured out: A potential bug has been discovered.

e.g. What would happen if the user is typing in another text area (for example, a search bar) but it gets hijacked back into the message input?

What if you catch keyup events on a root element and return false to prevent events from bubbling up on all text input elements?

as a compromise, you can .focus() the chat bar on the first load, and when new channels are selected

autofocus has been enabled, I will figure out a better heuristic in coming day - feel free to keep this one open