emmetio / brackets-emmet

Emmet plugin for Brackets editor
http://emmet.io
MIT License
489 stars 188 forks source link

Prevents confirming 'recent projects' dropdown via Enter key #60

Open peterflynn opened 9 years ago

peterflynn commented 9 years ago
  1. Press Ctrl-Alt-R to open the Recent Project dropdown
  2. (optional) Press down arrow a few times to highlight a different project
  3. Press Enter to reopen the highlighted project

Result: Dropdown closes, but nothing more happens

Highly context-specific keys like Enter and Tab really shouldn't be registered as global shortcuts, because they probably break all sorts of other pieces of UI too. Much better to register a key event listener just on the #editor-holder part of the DOM, or perhaps better yet listen for the "keypress" event on each Editor instance. Either one still lets you block the default editor/CodeMirror processing of the event, but you can be much more confident you're not breaking other parts of the Brackets UI in the process...

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.