mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-12-28 17:13:45 +03:00
Trigger commands on rootView when body is active element
This commit is contained in:
parent
6460cbe288
commit
53547b5a8d
@ -14,7 +14,11 @@ class WindowEventHandler
|
||||
@reloadRequested = false
|
||||
|
||||
@subscribe ipc, 'command', (command, args...) ->
|
||||
$(document.activeElement).trigger(command, args...)
|
||||
activeElement = document.activeElement
|
||||
# Use root view if body has focus
|
||||
if activeElement is document.body and atom.rootView?
|
||||
activeElement = atom.rootView
|
||||
$(activeElement).trigger(command, args...)
|
||||
|
||||
@subscribe ipc, 'context-command', (command, args...) ->
|
||||
$(atom.contextMenu.activeElement).trigger(command, args...)
|
||||
|
Loading…
Reference in New Issue
Block a user