plugin updates
This commit is contained in:
@@ -1392,9 +1392,14 @@ S2.define('select2/selection/base',[
|
||||
var id = container.id + '-container';
|
||||
var resultsId = container.id + '-results';
|
||||
var searchHidden = this.options.get('minimumResultsForSearch') === Infinity;
|
||||
var isRequired = this.options.get('required') === true;
|
||||
|
||||
this.container = container;
|
||||
|
||||
if (isRequired) {
|
||||
this.$selection.attr('aria-required', 'true')
|
||||
}
|
||||
|
||||
this.$selection.on('focus', function (evt) {
|
||||
self.trigger('focus', evt);
|
||||
});
|
||||
@@ -1553,6 +1558,11 @@ S2.define('select2/selection/single',[
|
||||
|
||||
var id = container.id + '-container';
|
||||
|
||||
var isRequired = this.options.get('required') === true;
|
||||
if (isRequired) {
|
||||
this.$selection.find('.select2-selection__rendered').attr('aria-required', 'true')
|
||||
}
|
||||
|
||||
this.$selection.find('.select2-selection__rendered')
|
||||
.attr('id', id)
|
||||
.attr('role', 'textbox')
|
||||
@@ -5069,6 +5079,10 @@ S2.define('select2/options',[
|
||||
this.options.disabled = $e.prop('disabled');
|
||||
}
|
||||
|
||||
if (!this.options.required) {
|
||||
this.options.required = $e.prop('required');
|
||||
}
|
||||
|
||||
if (this.options.language == null) {
|
||||
if ($e.prop('lang')) {
|
||||
this.options.language = $e.prop('lang').toLowerCase();
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user