From abbbe2f21682efd25204a800f8f5cf5639c227f5 Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Fri, 4 Dec 2015 13:07:47 +0100 Subject: [PATCH] remove clickCatcher: online_notification Known bug: clicks into .navigation get lost --- .../controllers/widget/online_notification.coffee | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/app/assets/javascripts/app/controllers/widget/online_notification.coffee b/app/assets/javascripts/app/controllers/widget/online_notification.coffee index 1793f59fe..2ac77e3b3 100644 --- a/app/assets/javascripts/app/controllers/widget/online_notification.coffee +++ b/app/assets/javascripts/app/controllers/widget/online_notification.coffee @@ -40,6 +40,7 @@ class App.OnlineNotificationWidget extends App.Controller release: => @removeContainer() + $(window).off 'click.notifications' App.OnlineNotification.unsubscribe( @subscribeId ) access: -> @@ -65,11 +66,6 @@ class App.OnlineNotificationWidget extends App.Controller processData: true ) - removeClickCatcher: => - return if !@clickCatcher - @clickCatcher.remove() - @clickCatcher = null - onShow: => @updateContent() @@ -95,14 +91,11 @@ class App.OnlineNotificationWidget extends App.Controller @hidePopover() ) - # add clickCatcher - @clickCatcher = new App.ClickCatcher - holder: @el.offsetParent() - callback: @hidePopover - zIndexScale: 4 + notificationsContainer.on 'click', @stopPropagation + $(window).on 'click.notifications', @hidePopover onHide: => - @removeClickCatcher() + $(window).off 'click.notifications' hidePopover: => @toggle.popover('hide')