Kop4lyf
Kop4lyf

Reputation: 4590

Angular bootstrap dropdown auto-close not working when set to outside click

It is a simple dropdown which is supposed to close only on outside click. It used to work in the earlier version (0.13).

Am I doing something wrong. Don't want to have a work around like stop propagation and prevent default. That is my last resort.

Below is the plunkr for a simple dropdown:

http://plnkr.co/edit/A2vDHb43PThalcHAhLkJ?p=preview

    <span class="dropdown" uib-dropdown auto-close="outsideClick">
      <a href="javascript:void(0);" class="dropdown-toggle" uib-dropdown-toggle>
        Click me for a dropdown, yo!
      </a>
      <ul class="dropdown-menu">
        <li>Element 1</li>
        <li>Element 2</li>
      </ul>
    </span>

Upvotes: 0

Views: 5217

Answers (1)

krutkowski86
krutkowski86

Reputation: 1083

You should use uib-dropdown-menu directive:

<ul uib-dropdown-menu class="dropdown-menu">
    <li>Element 1</li>
    <li>Element 2</li>
</ul>

Here's a working plunker

Upvotes: 6

Related Questions