From 389aa6490a9b0824994286855ed22f27274939c2 Mon Sep 17 00:00:00 2001 From: Nicola Peduzzi Date: Mon, 29 Jan 2018 13:15:37 +0000 Subject: [PATCH] Restore #102 with further improvements by @assafganor Fix #138 --- angular-inview.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/angular-inview.js b/angular-inview.js index bb6c177..6f1f799 100644 --- a/angular-inview.js +++ b/angular-inview.js @@ -360,9 +360,9 @@ function signalFromEvent (target, event) { subscriber(e); }; var el = angular.element(target); - el.on(event, handler); + event.split(' ').map(e => el[0].addEventListener(e, handler, true)); subscriber.$dispose = function () { - el.off(event, handler); + event.split(' ').map(e => el[0].removeEventListener(e, handler, true)); }; }); }