I actually have been hitting issues with @completion as well and just compared our implementation with GitHub.
I think we are being too smart.
should not autocomplete, if it does it means that when an autocomplete window is open only
and
function as expected. Meaning they move you around the text but
is in a “hijacked” state.
The fix is quite easy, just stop hijacking it. Have arrows always work as arrows. ENTER or click can choose a target just fine.
I also agree that clicking anywhere that is not in the “autocomplete” area should collapse the autocomplete, cursor is no longer in the right spot, makes no sense to have it open.
I vaguely recall “click” away hiding it, but now 100% sure.