From ec0c45e1346dd88b76e7dd8974b06eba138a017a Mon Sep 17 00:00:00 2001 From: Andrey Matveev Date: Fri, 25 Mar 2016 16:13:35 +0700 Subject: [PATCH] Update 00-directive.js You should add e.stopImmediatePropagation(); and e.stopPropagation(); to avoid opening new tab and new window simultaneously. --- src/scripts/00-directive.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scripts/00-directive.js b/src/scripts/00-directive.js index 4ffdc97..44a3ad2 100644 --- a/src/scripts/00-directive.js +++ b/src/scripts/00-directive.js @@ -50,7 +50,9 @@ app.directive('ngSocialButtons', ['$compile', '$q', '$parse', '$http', '$locatio return; } e.preventDefault(); - + e.stopPropagation(); + e.stopImmediatePropagation(); + if (options.track && typeof _gaq != 'undefined' && angular.isArray(_gaq)) { _gaq.push(['_trackSocial', options.track.name, options.track.action, $scope.url]); }