IfnotFr / PopConfirm

A simple action confirmation plugin for jQuery based on Twitter Bootstrap Popover

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clicking somewhere else should close the popovers

auxiliary opened this issue · comments

Hi

Thanks for this great plugin.
It'd be great if clicking somewhere else on the screen closes any open popover.
I'm not sure, but it seems that this will make it work (Line 79):

$('html').on('click', function(){
    last.popover('hide');
});

self.bind('click', function(e) {
    e.preventDefault();
    e.stopPropagation();

    self.popover('show');
    ...

Sorry I didn't have the time to fork and merge.

This is more correct:

...
if (last)
{
    last.popover('hide');
}
...

Thanks for the proposal.

I will take a look in the week :)

Fixed here with your piece of code.

But it does not fix #1 =/