diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-01-26 22:21:07 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-01-26 22:21:07 -0500 |
commit | a371d53e635f1c0aa6097045ac5b59e78962f760 (patch) | |
tree | 710921d7d7e82450bc0f01158353de24aa7f6fd2 /assets/js/components/select-dropdown-autocomplete.js | |
parent | c3d42a21b28805ab0ec3d7bac3530972ca356067 (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.js | 5 |
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) |