Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove deprecated jQuery shorthand #5564

Merged
merged 1 commit into from Jul 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/js/select2/data/tokenizer.js
Expand Up @@ -58,7 +58,7 @@ define([
// Replace the search term if we have the search box
if (this.$search.length) {
this.$search.val(tokenData.term);
this.$search.focus();
this.$search.trigger('focus');
}

params.term = tokenData.term;
Expand Down
8 changes: 4 additions & 4 deletions src/js/select2/dropdown/search.js
Expand Up @@ -49,23 +49,23 @@ define([
container.on('open', function () {
self.$search.attr('tabindex', 0);

self.$search.focus();
self.$search.trigger('focus');

window.setTimeout(function () {
self.$search.focus();
self.$search.trigger('focus');
}, 0);
});

container.on('close', function () {
self.$search.attr('tabindex', -1);

self.$search.val('');
self.$search.blur();
self.$search.trigger('blur');
});

container.on('focus', function () {
if (!container.isOpen()) {
self.$search.focus();
self.$search.trigger('focus');
}
});

Expand Down
2 changes: 1 addition & 1 deletion src/js/select2/selection/base.js
Expand Up @@ -82,7 +82,7 @@ define([
self.$selection.removeAttr('aria-owns');

window.setTimeout(function () {
self.$selection.focus();
self.$selection.trigger('focus');
}, 0);

self._detachCloseHandler(container);
Expand Down
2 changes: 1 addition & 1 deletion src/js/select2/selection/search.js
Expand Up @@ -175,7 +175,7 @@ define([

this.resizeSearch();
if (searchHadFocus) {
this.$search.focus();
this.$search.trigger('focus');
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/js/select2/selection/single.js
Expand Up @@ -59,7 +59,7 @@ define([

container.on('focus', function (evt) {
if (!container.isOpen()) {
self.$selection.focus();
self.$selection.trigger('focus');
}
});
};
Expand Down