Remove deprecated jQuery shorthand (#5564)
This commit is contained in:
parent
9c4f0c86a1
commit
8a5aeabcce
2
src/js/select2/data/tokenizer.js
vendored
2
src/js/select2/data/tokenizer.js
vendored
@ -58,7 +58,7 @@ define([
|
|||||||
// Replace the search term if we have the search box
|
// Replace the search term if we have the search box
|
||||||
if (this.$search.length) {
|
if (this.$search.length) {
|
||||||
this.$search.val(tokenData.term);
|
this.$search.val(tokenData.term);
|
||||||
this.$search.focus();
|
this.$search.trigger('focus');
|
||||||
}
|
}
|
||||||
|
|
||||||
params.term = tokenData.term;
|
params.term = tokenData.term;
|
||||||
|
8
src/js/select2/dropdown/search.js
vendored
8
src/js/select2/dropdown/search.js
vendored
@ -49,10 +49,10 @@ define([
|
|||||||
container.on('open', function () {
|
container.on('open', function () {
|
||||||
self.$search.attr('tabindex', 0);
|
self.$search.attr('tabindex', 0);
|
||||||
|
|
||||||
self.$search.focus();
|
self.$search.trigger('focus');
|
||||||
|
|
||||||
window.setTimeout(function () {
|
window.setTimeout(function () {
|
||||||
self.$search.focus();
|
self.$search.trigger('focus');
|
||||||
}, 0);
|
}, 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -60,12 +60,12 @@ define([
|
|||||||
self.$search.attr('tabindex', -1);
|
self.$search.attr('tabindex', -1);
|
||||||
|
|
||||||
self.$search.val('');
|
self.$search.val('');
|
||||||
self.$search.blur();
|
self.$search.trigger('blur');
|
||||||
});
|
});
|
||||||
|
|
||||||
container.on('focus', function () {
|
container.on('focus', function () {
|
||||||
if (!container.isOpen()) {
|
if (!container.isOpen()) {
|
||||||
self.$search.focus();
|
self.$search.trigger('focus');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
2
src/js/select2/selection/base.js
vendored
2
src/js/select2/selection/base.js
vendored
@ -82,7 +82,7 @@ define([
|
|||||||
self.$selection.removeAttr('aria-owns');
|
self.$selection.removeAttr('aria-owns');
|
||||||
|
|
||||||
window.setTimeout(function () {
|
window.setTimeout(function () {
|
||||||
self.$selection.focus();
|
self.$selection.trigger('focus');
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
||||||
self._detachCloseHandler(container);
|
self._detachCloseHandler(container);
|
||||||
|
2
src/js/select2/selection/search.js
vendored
2
src/js/select2/selection/search.js
vendored
@ -175,7 +175,7 @@ define([
|
|||||||
|
|
||||||
this.resizeSearch();
|
this.resizeSearch();
|
||||||
if (searchHadFocus) {
|
if (searchHadFocus) {
|
||||||
this.$search.focus();
|
this.$search.trigger('focus');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
2
src/js/select2/selection/single.js
vendored
2
src/js/select2/selection/single.js
vendored
@ -59,7 +59,7 @@ define([
|
|||||||
|
|
||||||
container.on('focus', function (evt) {
|
container.on('focus', function (evt) {
|
||||||
if (!container.isOpen()) {
|
if (!container.isOpen()) {
|
||||||
self.$selection.focus();
|
self.$selection.trigger('focus');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user