mirror of
https://github.com/atom/atom.git
synced 2026-02-08 21:55:05 -05:00
Fix bug: Don't call handleKeyEvent with undefined event
Ace triggers key handlers for both keydown (onCommandKey) and input (onTextInput) events. Input events don't pass the event, which was blowing up the keymap.
This commit is contained in:
committed by
Corey Johnson & Nathan Sobo
parent
66707fc423
commit
783e9446e9
@@ -35,10 +35,9 @@ class Editor extends Template
|
||||
buildAceEditor: ->
|
||||
@aceEditor = ace.edit this[0]
|
||||
@aceEditor.setTheme(require "ace/theme/twilight")
|
||||
|
||||
@aceEditor.setKeyboardHandler
|
||||
handleKeyboard: (data, hashId, keyString, keyCode, e) =>
|
||||
if @keyEventHandler?.handleKeyEvent(e)
|
||||
handleKeyboard: (data, hashId, keyString, keyCode, event) =>
|
||||
if event and @keyEventHandler?.handleKeyEvent(event)
|
||||
{command: {exec: ->}}
|
||||
else
|
||||
null
|
||||
|
||||
Reference in New Issue
Block a user