From ad4e3cc6454a71b4bc7f7e98528998ad57d98fd9 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 15 Nov 2013 10:31:54 +0000 Subject: [PATCH] feature(dom) Notify click: add focus --- lib/client/dom.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/client/dom.js b/lib/client/dom.js index d53667b4..c08159f2 100644 --- a/lib/client/dom.js +++ b/lib/client/dom.js @@ -655,12 +655,17 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; }, window); this.send = function(msg) { - var notify, granted = Notify.check(); + var notify, + focus = window.focus.bind(window), + granted = Notify.check(); - if (granted && Show) + if (granted && Show) { notify = new Notification(msg, { icon: '/img/favicon/favicon-notify.png', }); + + Events.addClick(focus, notify); + } }; this.check = function () {