Merge pull request #17291 from Godmartinz/fix_bulk_checkout_focus

Fixes #12094 - Adds focus to select2 in bulk checkout
This commit is contained in:
snipe
2025-07-07 13:57:12 +01:00
committed by GitHub
@@ -145,6 +145,22 @@
return true; // ensure form still submits
});
$('#assigned_assets_select').select2('open');
setTimeout(function () {
const $searchField = $('.select2-search__field');
const $results = $('.select2-results');
// Focus the search input
$searchField.focus();
// Hide results initially
$results.hide();
// Show results when a user starts typing
$searchField.on('input', function () {
$results.show();
});
}, 0);
});
</script>