diff --git a/src/js/select2/core.js b/src/js/select2/core.js index 3d4ade2e..921a2577 100644 --- a/src/js/select2/core.js +++ b/src/js/select2/core.js @@ -276,6 +276,23 @@ define([ Select2.prototype._registerEvents = function () { var self = this; + + this.on('focus', function () { + self.$container.addClass('select2-container--focus'); + + if (!self.$container.hasClass('select2-container--disabled') && + !self.isOpen()) { + if (self.options.get('multiple')) { + window.setTimeout(function () { + self.open(); + }, + self.options.get('ajax') ? 300 : 100); + } + else { + self.open(); + } + } + }); this.on('open', function () { self.$container.addClass('select2-container--open');