Autocomplete makes it difficult to use double-tilde strikethrough
Summary
When I'm editing a comment or description, I will sometimes write text and then use the arrow keys to move back and add double-tilde strikethrough around it. If I enter two tildes and then press the up or down arrow key (to move away from the text I just struck through), the autocomplete popup is visible and the up and down arrow keys move the selected autocomplete item, rather than moving the cursor as I'd expect.
Steps to reproduce
- Focus a Markdown-enabled comment or description editor widget
- Type
~
— the autocomplete popup appears, enabling you to select a label — GOOD - Type
~
a second time — the autocomplete popup is still visible, and it consumes the up/down arrow keys and the return key — BAD
What is the current bug behavior?
The autocomplete popup remains visible after entering a second tilde, making keyboard navigation more difficult.
What is the expected correct behavior?
Hide the autocomplete popup after entering two consecutive tildes. The second tilde changes the meaning of the first tilde, so the autocomplete popup is no longer relevant.
Relevant logs and/or screenshots
Possible fixes
A similar scenario that works like I'd expect:
- Type
@
— the autocomplete popup appears, enabling you to select a user — GOOD - Type
@
a second time — the autocomplete popup disappears — GOOD