rust-playground
rust-playground copied to clipboard
Escape key in vim mode moves focus off editor (Firefox)
Hello,
I've noticed when using the Ace Editor in the playground that hitting <Esc> (a common thing in vim) causes the focus to shift from the textarea to the browser window. This makes Vim mode essentially unusable, as far as I can tell.
I've confirmed that this does not happen in Chrome. At any rate, there could probably be a listener bound to the UI element rendering the editor that simply captures the event and throws it away or refocuses to the editor.
Thanks
I cannot reproduce:

This happens to me in Chrome 116.0.5845.111 on Windows 10.
@shepmaster Is there anything I can provide to help diagnose this?
On Chrome 116.0.5845.110 (macOS arm64), this continues to work for me:
to help diagnose this?
Could you go to the Ace Editor's kitchen sink and see if the same behavior appears there? If so, then it's probably something Ace-specific. If not, then it might be something about how we are using Ace.
You could also try creating a fresh Chrome profile / disabling any extensions and trying again. Do you have any system-global accessories that might grab keyboard input. If it was super easy, I'd even ask if you could create a new Windows user and try from there.
I've got nothing specific.
Kitchen sink works the same way as rust playground for me.
When I tried new anonymous window (without extensions and possibly other configurations?) everything works well both in ace and on the playground. Although the only extension I would guess should matter is vimium which is turned off on the playground.
So at least for me it seems to be an issue with my browser configuration.
Thank you for your time.
Although the only extension I would guess should matter is vimium which is turned off on the playground.
I can confirm that the problem seems indeed caused by the vimium plugin. After adding the exclusion rule in the plugin, saving preferences, and reloading the playground the esc key works correctly!
I'll assume that's the original case then and close. Thanks all for the debugging!
thanks for this awesome tool
Wow! this is good. Nice work guys