Prevent bootstrap popover closing based on a condition

时间:2015-06-15 15:13:09

标签: angularjs twitter-bootstrap angular-strap

I have created a popover (bs-popover from angular-strap) that automatically closes after clicking outside of popover. I want to stop closing popover when a condition is true.

I used this event listener:

$scope.$on('tooltip.hide.before', function(event, ui) {
    if(something === true){
        console.log('HERE');  // Writes HERE on close popover
        event.preventDefault();
    }
});

But it fails to stop event. Any solution?

0 个答案:

没有答案