angular-ui / bootstrap

PLEASE READ THE PROJECT STATUS BELOW. Native AngularJS (Angular) directives for Bootstrap. Smaller footprint (20kB gzipped), no 3rd party JS dependencies (jQuery, bootstrap JS) required. Please read the README.md file before submitting an issue!
http://angular-ui.github.io/bootstrap/
MIT License
14.27k stars 6.73k forks source link

Popover trigger="outsideClick" not closes popover when clicking on bs.dropdown #6546

Open DanasPa opened 7 years ago

DanasPa commented 7 years ago

Bug description:

I'm using a uib-popover with outsideClick trigger. The popover outsideClick trigger works just fine until you click dropdown element. So the problem is then you open a popover and try to click dropdown element popover should disappear and now its not.

Link to minimally-working plunker that reproduces the issue:

plnkr

Steps to reproduce the issue:

Click link to open a popover Click dropdown button

Popover should disappear and now its not.

Version of Angular, UIBS, and Bootstrap Angular: 1.6.3 UIBS: 2.5.0 Bootstrap: 3.3.7

WVWillHall commented 7 years ago

popup catches the event.

You can solve this by doing something like...

  $scope.clickPopupClickOutside = function() {
    angular.element(document).click();
  }
        <button ng-click="clickPopupClickOutside()" class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown">Dropdown<span class="caret"></span>