cocalc icon indicating copy to clipboard operation
cocalc copied to clipboard

@ mentions hijack arrow keys (until you press space bar)

Open novoselt opened this issue 6 months ago • 7 comments

Describe the bug Arrow keys stop responding when it should not while typing a chat message

To Reproduce Steps to reproduce the behavior:

  1. Go to chat
  2. Type I am writing a message in chat and my arrow keys work. Next I make @me
  3. Observe during the process that indeed arrow keys work initially!
  4. When @ is typed, the menu with collaborators appears, up-down arrows control the menu, left-right do not do anything.
  5. When "me" is typed, the menu disappears (assuming you have no collaborators that match it), as expected.
  6. Left-right arrow keys still do NOT work!
  7. Pressing Esc makes them work again. My speculation is that selection menu remains open/active/focused/whatever, but it is empty and invisible because there are no matches. The effect of pressing Esc should happen as soon as there are no matches.

Expected behavior If there is no active menu, arrow keys should move the cursor through the text.

novoselt avatar Jul 30 '24 17:07 novoselt