Always unbind internal listeners when closing a modal dialog

This commit is contained in:
Frederic Guillot
2017-01-26 22:21:07 -05:00
parent c3d42a21b2
commit a371d53e63
10 changed files with 38 additions and 6 deletions

View File

@@ -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)