Just enable keyboard bindings if widget is shown.

This commit is contained in:
Martin Edenhofer 2016-03-22 08:26:04 +01:00
parent 715ed8e6da
commit dc4c8b0e99

View file

@ -57,7 +57,6 @@ class App.OnlineNotificationWidget extends App.Controller
) )
$(window).on 'click.notifications', @hide $(window).on 'click.notifications', @hide
$(window).on 'keydown.notifications', @listNavigate
@updateContent() @updateContent()
@ -201,11 +200,13 @@ class App.OnlineNotificationWidget extends App.Controller
@show() @show()
show: => show: =>
$(window).on 'keydown.notifications', @listNavigate
@shown = true @shown = true
@el.show() @el.show()
@updateHeight() @updateHeight()
hide: => hide: =>
$(window).off 'keydown.notifications'
@shown = false @shown = false
@el.hide() @el.hide()