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 '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()