While using the Ace JavaScript editor with vim keybindings, I encountered an issue. Whenever I press the escape key to exit insert mode, the editor loses focus instead of exiting the mode. How can I capture this keypress in all modern browsers so that Ace can properly utilize it?
If you want to see this problem in action, visit this link, enable vim keys, and try entering and then escaping a mode. This behavior is observed on the latest version of Firefox.