rust-playground icon indicating copy to clipboard operation
rust-playground copied to clipboard

Escape key in vim mode moves focus off editor (Firefox)

Open haljac opened this issue 2 years ago • 4 comments

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

haljac avatar May 03 '23 12:05 haljac

I cannot reproduce:

2023-05-03 14 19 09

shepmaster avatar May 03 '23 18:05 shepmaster

This happens to me in Chrome 116.0.5845.111 on Windows 10.

@shepmaster Is there anything I can provide to help diagnose this?

mladedav avatar Aug 29 '23 15:08 mladedav

On Chrome 116.0.5845.110 (macOS arm64), this continues to work for me:

2023-08-29 11 46 06

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.

shepmaster avatar Aug 29 '23 15:08 shepmaster

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.

mladedav avatar Aug 29 '23 19:08 mladedav

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!

hariseldon78 avatar Jul 01 '24 14:07 hariseldon78

I'll assume that's the original case then and close. Thanks all for the debugging!

shepmaster avatar Jul 01 '24 15:07 shepmaster

thanks for this awesome tool

hariseldon78 avatar Jul 02 '24 14:07 hariseldon78

Wow! this is good. Nice work guys

Blindspot22 avatar Jul 02 '24 16:07 Blindspot22