From dc4c8b0e990451f70a316145617e79d6053dca41 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 22 Mar 2016 08:26:04 +0100 Subject: [PATCH] Just enable keyboard bindings if widget is shown. --- .../app/controllers/widget/online_notification.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/app/controllers/widget/online_notification.coffee b/app/assets/javascripts/app/controllers/widget/online_notification.coffee index b2b420661..520fc64f6 100644 --- a/app/assets/javascripts/app/controllers/widget/online_notification.coffee +++ b/app/assets/javascripts/app/controllers/widget/online_notification.coffee @@ -57,7 +57,6 @@ class App.OnlineNotificationWidget extends App.Controller ) $(window).on 'click.notifications', @hide - $(window).on 'keydown.notifications', @listNavigate @updateContent() @@ -201,11 +200,13 @@ class App.OnlineNotificationWidget extends App.Controller @show() show: => + $(window).on 'keydown.notifications', @listNavigate @shown = true @el.show() @updateHeight() hide: => + $(window).off 'keydown.notifications' @shown = false @el.hide()