diff --git a/src/window-event-handler.coffee b/src/window-event-handler.coffee index a6f134d35..03984579a 100644 --- a/src/window-event-handler.coffee +++ b/src/window-event-handler.coffee @@ -9,7 +9,7 @@ module.exports = class WindowEventHandler constructor: -> @subscribe ipc, 'command', (command, args...) -> - $(document.activeElement).trigger(command, args...) + $(window).trigger(command, args...) @subscribe $(window), 'focus', -> $("body").removeClass('is-blurred') @subscribe $(window), 'blur', -> $("body").addClass('is-blurred')