Enter/Up/Down arrows don't work when autocomplete suggestions list is empty
Context
Reported by @rogerwoo in #379045 (comment 1367655122)
Description
Symptom:
- Enter / Return key functionality broken.
- Up/down arrow keys also don't work.
My workflow steps:
- Type
%
to trigger the dropdown. Select a milestone, ie.16.4
--> %16.4 - Go into markdown and change the
4
to a5
. - Go back into rich text, position your cursor immediately after the rightmost
"
and try to press "new line". It doesn't work.
Simpler reproduction steps:
- Type
%"16.5"
- Position your cursor after the second
"
and try to press one of [return / up arrow / down arrow]
Additional context
Additional context by @himkp:
It makes sense now. I believe the problem is because the enter key is being captured by the suggestions dropdown. However since the search string (16.5) resulted in no items, the suggestions list is empty (and therefore hidden). But the enter key remains captured anyway. It is evident from the fact that enter works fine if you add a space right before it.
It's a nice catch. I will try to find how to fix it.
👍
Edited by Himanshu Kapoor