bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Auto position does not work correctly when dropdown is in nav tag #v.5

Open alexshnur opened this issue 3 years ago • 3 comments

  • Operating system and version (Windows)
  • Browser and version (All)
  • https://codepen.io/alexshnur/pen/qBrOPNb?editors=1010

alexshnur avatar May 12 '21 20:05 alexshnur

The problem is we don't initialize Popper for dropdowns in the nav element, tho I'm not sure why (I wasn't aware of this).

As a workaround you could add .dropdown-menu-end to the dropdown-menu element to have it right-aligned.

alpadev avatar May 13 '21 17:05 alpadev

this does not solve the problem for dynamic content

alexshnur avatar May 13 '21 18:05 alexshnur

I was running in to the same issue. The following workaround solves the problem for me to render some right-aligned dropdown menu:

<div
  class="dropdown-menu dropdown-menu-end"
  :class="{ show: showMenu }"
  data-bs-popper
>

</div>

This works because the CSS selector include data-bs-popper. Not sure if that causes other side effects though.

danrot avatar Jan 24 '24 13:01 danrot