vendor/assets/javascripts/select2-full.js in select2-rails-4.0.6 vs vendor/assets/javascripts/select2-full.js in select2-rails-4.0.7

- old
+ new

@@ -1,7 +1,7 @@ /*! - * Select2 4.0.6 + * Select2 4.0.7 * https://select2.github.io * * Released under the MIT license * https://github.com/select2/select2/blob/master/LICENSE.md */ @@ -4571,11 +4571,11 @@ CloseOnSelect.prototype._selectTriggered = function (_, evt) { var originalEvent = evt.originalEvent; // Don't close if the control key is being held - if (originalEvent && originalEvent.ctrlKey) { + if (originalEvent && (originalEvent.ctrlKey || originalEvent.metaKey)) { return; } this.trigger('close', { originalEvent: originalEvent, @@ -5455,26 +5455,9 @@ }); }; 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'); });