Esc in VIM mode unfocuses code editor in Vivaldi browser #7056
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Specs
OS: Windows 11 Pro
Browser: Vivaldi 6.1.3035.302 (Stable channel) (64 bites)
CodeMirror version: 5
Bug description
I can't use VIM mode because every time I press Esc, it pops out of the text box instead of just going into normal mode.
To Reproduce
NORMAL MODEby default.ito enterINSERT MODE!Esc!Expected behavior
The code box is expected to react to further inputs of user after return to
NORMAL MODEwithEsckey.Additional information
I've tested it in Chrome, Firefox and Edge and I'm experiencing the bug in vivaldi alone.
I've tested it in incognito mode, with all add-ons and ad block disabled and the error is still present.
If this browser doesn't let scripts intercept Esc presses, I don't think there's anything we can do about that.
@marijnh, Seems to work fine here:https://unixpapa.com/js/testkey.html
Scripts are able to capture
Escpresses in Vivaldi. Vivaldi does however also automatically unfocus the backing textarea. Fortunately this is done sensibly, so it is stoppable by doingif (evt.key === 'Escape') evt.stopPropagation(). I think doing this inonKeyEventTargetKeyDownof codemirror5 Vim mode would solve this.(One might blame Vivaldi here, but I really appreciate its default behavior, because of my Vim habits. Other browsers may follow suite (maybe Edge has already?), so it makes sense for codemirror to handle this.)
Same thing is happening for Leetcode + VIM keyboard binding