diff --git a/src/views/email.js b/src/views/email.js index b7226e007..47ee5fd23 100644 --- a/src/views/email.js +++ b/src/views/email.js @@ -589,7 +589,8 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio }); function hashChangeListener() { - if (!$scope.ready) return; + // prevent the change listener to handle the change if it does not belong to this view. The eventhandler will be subsequently removed + if (!$scope.ready || !$location.path().startsWith('/email/')) return; // event listener is called from DOM not angular, need to use $apply $scope.$apply(function () {