mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Stop propagation on all commands
This commit is contained in:
@@ -510,8 +510,14 @@ EditorComponent = React.createClass
|
||||
addCommandListeners: (listenersByCommandName) ->
|
||||
{parentView} = @props
|
||||
|
||||
for command, listener of listenersByCommandName
|
||||
parentView.command command, listener
|
||||
addListener = (command, listener) ->
|
||||
parentView.command command, (event) ->
|
||||
event.stopPropagation()
|
||||
listener(event)
|
||||
|
||||
addListener(command, listener) for command, listener of listenersByCommandName
|
||||
|
||||
return
|
||||
|
||||
observeConfig: ->
|
||||
@subscribe atom.config.observe 'editor.showIndentGuide', @setShowIndentGuide
|
||||
|
||||
Reference in New Issue
Block a user