Fix JS-error on custom select2 focus handler

This commit is contained in:
Richard Schreiber
2022-09-08 10:20:13 +02:00
committed by GitHub
parent 603547f783
commit 61d5e66ad4

View File

@@ -565,7 +565,7 @@ var form_handlers = function (el) {
},
}).on("select2:select", function () {
// Allow continuing to select
if ($s.hasAttribute("multiple")) {
if ($s[0].hasAttribute("multiple")) {
window.setTimeout(function () {
$s.parent().find('.select2-search__field').focus();
}, 50);