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

147
Vistas
React-Bootstrap Overlay positioning not working completely fine after upgrading Bootstrap from v4 to v5 and Bootstrap-React from v1 to v2

I have the following Overlay that contains a color picker:

<Overlay target={pickerRef.current} show={isOpen} placement={overlayPlacement}>
    {(props) => (
        <PickerValues {...props}>
            {colors.map((color) => (
                <Color
                    key={color}
                    $color={baseColors[color]}
                    onClick={() => {
                        onSelect(color);
                        setSelectedColor(baseColors[color]);
                        setIsOpen(false);
                    }}
                />
            ))}
        </PickerValues>
    )}
</Overlay>

Whenever I click the element that opens this overlay, the overlay appears but initially it is not positioned correctly relative to the target. Interestingly, once I resize the browser by even 1 px, it gets re-positioned where its supposed to be. This became an issue after upgrading Bootstrap from v4 to v5 and Bootstrap-React from v1 to v2. From what I've seen in the documentation, that target and placement properties are the same so I'm not sure what might be causing this. When I inspect the overlay in order to see why it is positioned there, I see this:

Before resize:

position: absolute;
inset: 0px auto auto 0px;
transform: translate(10px, 219px);

After resize:

position: absolute;
inset: 0px auto auto 0px;
transform: translate(970px, 219px);

Before resize:

enter image description here

After resize:

enter image description here

Where might this issue be coming from?

about 4 years ago · Juan Pablo Isaza
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