Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

394
Vistas
Select2 search input not working on bootstrap5

I cannot click on the search input dropdown. First of all, I already googled and this is a common problem for select2 with bootstrap3 or bootstrap4, however for bootstrap 5 its a little bit different (I tried remove z-index on bootstrap 4 and its working), I already tried solutions like z-index, $.fn.modal.Constructor.prototype.enforceFocus = function() {};, $('#mySelect2').select2({ dropdownParent: $('#myModal') });, and several css but still wont work.

Maybe im missing something im not sure, its been like 4 days, hope u guys can help me.

here jsFiddle : jsfiddle

about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

Really not sure why, but dropdownParent will fix it.

$('.select2').each(function () {
    $(this).select2({
        theme: 'bootstrap-5',
        dropdownParent: $(this).parent(),
    });
});
about 4 years ago · Santiago Gelvez Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda