Home > Blockchain >  Bootstrap 5.1.3 Dropdown data-bs-boundary No Longer Works
Bootstrap 5.1.3 Dropdown data-bs-boundary No Longer Works

Time:11-29

Prior to the v5 upgrade, I was using data-boundary="window" on a Dropdown with variable length menu items. This, assuming that data-bs-boundary is the new attribute, is no longer working.

The Dropdown is right justified on the page and due to this, dropdown items that are longer that the selected item are truncated by the edge of the window.

I have also played with the data-bs-popper attribute mentioned in the migration docs to no avail.

This was working fine in 4.6.

CodePudding user response:

Just add the position-static class to the dropdown container.

CodePudding user response:

Popper 2.× sets the "area that the element will be checked for overflow relative to" using JavaScript's Document method querySelector().

Instead of assigning window to data-bs-boundary, try to to assign selectors, such as type selectors body or html, to it:

data-bs-boundary="body"
  • Related