From 982fb27f58404adcb27a9efaa2db02e1f8484dc3 Mon Sep 17 00:00:00 2001 From: shortcutme Date: Tue, 6 Mar 2018 12:07:07 +0100 Subject: [PATCH] Close notification on input enter --- src/Ui/media/Notifications.coffee | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Ui/media/Notifications.coffee b/src/Ui/media/Notifications.coffee index c06a95dc..393d5a44 100644 --- a/src/Ui/media/Notifications.coffee +++ b/src/Ui/media/Notifications.coffee @@ -69,6 +69,11 @@ class Notifications $(".select", elem).on "click", => @close elem + # Input enter + $("input", elem).on "keyup", (e) => + if e.keyCode == 13 + @close elem + return elem @@ -81,4 +86,4 @@ class Notifications console.log "[Notifications]", args... -window.Notifications = Notifications \ No newline at end of file +window.Notifications = Notifications