summaryrefslogtreecommitdiff
path: root/assets/js/components/select-dropdown-autocomplete.js
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-01-26 22:21:07 -0500
committerFrederic Guillot <fred@kanboard.net>2017-01-26 22:21:07 -0500
commita371d53e635f1c0aa6097045ac5b59e78962f760 (patch)
tree710921d7d7e82450bc0f01158353de24aa7f6fd2 /assets/js/components/select-dropdown-autocomplete.js
parentc3d42a21b28805ab0ec3d7bac3530972ca356067 (diff)
Always unbind internal listeners when closing a modal dialog
Diffstat (limited to 'assets/js/components/select-dropdown-autocomplete.js')
-rw-r--r--assets/js/components/select-dropdown-autocomplete.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/assets/js/components/select-dropdown-autocomplete.js b/assets/js/components/select-dropdown-autocomplete.js
index 42344be5..c2c36f5b 100644
--- a/assets/js/components/select-dropdown-autocomplete.js
+++ b/assets/js/components/select-dropdown-autocomplete.js
@@ -238,6 +238,11 @@ KB.component('select-dropdown-autocomplete', function(containerElement, options)
KB.on('select.dropdown.loading.start', onLoadingStart);
KB.on('select.dropdown.loading.stop', onLoadingStop);
+ KB.on('modal.close', function () {
+ KB.removeListener('select.dropdown.loading.start', onLoadingStart);
+ KB.removeListener('select.dropdown.loading.stop', onLoadingStop);
+ });
+
chevronIconElement = KB.dom('i')
.attr('class', 'fa fa-chevron-down select-dropdown-chevron')
.click(toggleDropdownMenu)