It doesn't really do what it says it does, and it introduces other issues (single select elements re-open after selection). Fixes #5490
This commit is contained in:
parent
6009970b10
commit
39bfabd94b
17
src/js/select2/core.js
vendored
17
src/js/select2/core.js
vendored
@ -276,23 +276,6 @@ define([
|
|||||||
|
|
||||||
Select2.prototype._registerEvents = function () {
|
Select2.prototype._registerEvents = function () {
|
||||||
var self = this;
|
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 () {
|
this.on('open', function () {
|
||||||
self.$container.addClass('select2-container--open');
|
self.$container.addClass('select2-container--open');
|
||||||
|
Loading…
Reference in New Issue
Block a user