Close notification on input enter

This commit is contained in:
shortcutme 2018-03-06 12:07:07 +01:00
parent 0d1a5846a1
commit 982fb27f58
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -69,6 +69,11 @@ class Notifications
$(".select", elem).on "click", => $(".select", elem).on "click", =>
@close elem @close elem
# Input enter
$("input", elem).on "keyup", (e) =>
if e.keyCode == 13
@close elem
return elem return elem
@ -81,4 +86,4 @@ class Notifications
console.log "[Notifications]", args... console.log "[Notifications]", args...
window.Notifications = Notifications window.Notifications = Notifications