From c4321b7d7d6216922c9164fc1dae8a6cde5a2934 Mon Sep 17 00:00:00 2001
From: Dmitry Sitnikov <12915739+Homecoming07@users.noreply.github.com>
Date: Sun, 27 May 2018 19:26:18 +0300
Subject: [PATCH] fix(unsubscribe) : unsubscribe on $animation

unsubscribe on $animate "enter", when enabled animation.
---
 src/uiSelectDirective.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/uiSelectDirective.js b/src/uiSelectDirective.js
index e1e8e0a89..d47974a52 100644
--- a/src/uiSelectDirective.js
+++ b/src/uiSelectDirective.js
@@ -215,6 +215,8 @@ uis.directive('uiSelect',
 
         scope.$on('$destroy', function() {
           $window.document.removeEventListener('click', onDocumentClick, true);
+          if(dropdown)
+            $select.$animate.off('enter', dropdown);
         });
 
         // Move transcluded elements to their correct position in main template