Let's move $scope.setFocus() to the controller (i.e. outside the reveal*Modal functions) to avoid setting the listener multiple times.