You need to remove the class .select2-container-activefrom the containing separator:
.on("select2-close", function () {
setTimeout(function() {
$('.select2-container-active').removeClass('select2-container-active');
$(':focus').blur();
}, 1);
});
I used setTimeouthere as a hacker way to make sure that this trigger after the plugin itself completes the closure.
JSFiddle demo .
source
share