replit / codemirror-vim

Vim keybindings for CM6
https://www.npmjs.com/package/@replit/codemirror-vim
MIT License
268 stars 27 forks source link

escape key blurs codemirror instead of exiting insert mode #138

Closed niwla23 closed 9 months ago

niwla23 commented 10 months ago

When I am in insert mode and press escape, I would expect it to go back to normal mode but instead the editor looses focus. I guess this is due to some browser defaults? Is there any way to fix this? I am using svelte-codemirror-editor.

nightwing commented 10 months ago

Maybe you have another codemirror extension that handles escape key before vim? Do you see the same issue on https://raw.githack.com/replit/codemirror-vim/master/dev/web-demo.html?

nightwing commented 9 months ago

Did you manage to find the cause of the issue you were seeing? I am closing this due to lack of reproduction steps, but if you have any additional info, please comment.

Dima-369 commented 6 months ago

I have the exact same issue happening, but it is indeed this issue: https://github.com/philc/vimium/issues/2734

If I disable the Vimium extension for the page in Firefox, Escape works as one expects to exit insert mode. I even have unmapAll and never bind the Escape key in my Vimium config, but it still creates this issue.

I see the same behavior on your linked test site:

https://raw.githack.com/replit/codemirror-vim/master/dev/web-demo.html